diff --git a/source/Nuke.Tooling/Process2.cs b/source/Nuke.Tooling/Process2.cs index fb3f1f8ca..45b79005e 100644 --- a/source/Nuke.Tooling/Process2.cs +++ b/source/Nuke.Tooling/Process2.cs @@ -42,9 +42,9 @@ public void Dispose() _process.Dispose(); } - public void Kill() + public void Kill(bool entireProcessTree = false) { - _process.Kill(); + _process.Kill(entireProcessTree); } public bool WaitForExit() @@ -53,7 +53,7 @@ public bool WaitForExit() // use _process.StartTime var hasExited = _process.WaitForExit(_timeout ?? -1); if (!hasExited) - _process.Kill(); + _process.Kill(entireProcessTree: true); return hasExited; } }