mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-07 11:54:59 +00:00
feature: log output of custom action if Wait for action exit
enabled (#1334)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
1dfb629cef
commit
119b0fe95c
2 changed files with 9 additions and 4 deletions
|
@ -36,13 +36,16 @@ namespace SourceGit.ViewModels
|
|||
_repo.SetWatcherEnabled(false);
|
||||
ProgressDescription = "Run custom action ...";
|
||||
|
||||
var log = _repo.CreateLog(CustomAction.Name);
|
||||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
if (CustomAction.WaitForExit)
|
||||
Commands.ExecuteCustomAction.RunAndWait(_repo.FullPath, CustomAction.Executable, _args, output => CallUIThread(() => ProgressDescription = output));
|
||||
Commands.ExecuteCustomAction.RunAndWait(_repo.FullPath, CustomAction.Executable, _args, log);
|
||||
else
|
||||
Commands.ExecuteCustomAction.Run(_repo.FullPath, CustomAction.Executable, _args);
|
||||
|
||||
log.Complete();
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return true;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue