Fix signal handling when --watch flag is given

Closes #132
This commit is contained in:
Andrey Nering
2018-09-16 21:59:00 -03:00
parent 687b4ec837
commit b65a0a3a8d
2 changed files with 25 additions and 10 deletions

View File

@@ -87,6 +87,11 @@ func main() {
return
}
ctx := context.Background()
if !watch {
ctx = getSignalContext()
}
e := task.Executor{
Force: force,
Watch: watch,
@@ -95,7 +100,7 @@ func main() {
Dir: dir,
Dry: dry,
Context: getSignalContext(),
Context: ctx,
Stdin: os.Stdin,
Stdout: os.Stdout,