diff --git a/invoke/runners.py b/invoke/runners.py index 281fe546..f7ca4f00 100644 --- a/invoke/runners.py +++ b/invoke/runners.py @@ -498,6 +498,7 @@ def _finish(self): # upset and aborted execution; make a generic Failure out of it and # raise that. if watcher_errors: + self.kill() # TODO: ambiguity exists if we somehow get WatcherError in *both* # threads...as unlikely as that would normally be. raise Failure(result, reason=watcher_errors[0])