This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 3131namespace System
3232{
3333 internal static class AssemblyVersionInformation {
34- internal const string Version = "0.33.0 " ;
34+ internal const string Version = "0.33.1 " ;
3535 }
3636}
Original file line number Diff line number Diff line change @@ -213,6 +213,7 @@ class ProcessTask<T> : TaskBase<T>, IProcessTask<T>
213213 {
214214 private IOutputProcessor < T > outputProcessor ;
215215 private ProcessWrapper wrapper ;
216+ private bool finished = false ;
216217
217218 public event Action < string > OnErrorData ;
218219 public event Action < IProcess > OnStartProcess ;
@@ -302,6 +303,7 @@ public override T RunWithReturn(bool success)
302303 RaiseOnStart ,
303304 ( ) =>
304305 {
306+ finished = true ;
305307 try
306308 {
307309 if ( outputProcessor != null )
@@ -350,7 +352,7 @@ public override string ToString()
350352
351353 public Process Process { get ; set ; }
352354 public int ProcessId { get { return Process . Id ; } }
353- public override bool Successful { get { return ! taskFailed && Task . Status == TaskStatus . RanToCompletion && Process . ExitCode == 0 ; } }
355+ public override bool Successful { get { return finished && ( ( ! taskFailed && Process . ExitCode == 0 ) || ( taskFailed && exceptionWasHandled ) ) ; } }
354356 public StreamWriter StandardInput { get { return wrapper ? . Input ; } }
355357 public virtual string ProcessName { get ; protected set ; }
356358 public virtual string ProcessArguments { get ; }
Original file line number Diff line number Diff line change @@ -491,7 +491,7 @@ public override string ToString()
491491 return $ "{ Task ? . Id ?? - 1 } { Name } { GetType ( ) } ";
492492 }
493493
494- public virtual bool Successful { get { return ! taskFailed || exceptionWasHandled ; /*Task.Status == TaskStatus.RanToCompletion && Task.Status != TaskStatus.Faulted;*/ } }
494+ public virtual bool Successful { get { return ! taskFailed || exceptionWasHandled ; } }
495495 public string Errors { get ; protected set ; }
496496 public Task Task { get ; protected set ; }
497497 public bool IsCompleted { get { return hasRun ; /*(Task as IAsyncResult).IsCompleted;*/ } }
You can’t perform that action at this time.
0 commit comments