diff --git a/cmd/src/batch_common.go b/cmd/src/batch_common.go index 6a78d8f296..c455975191 100644 --- a/cmd/src/batch_common.go +++ b/cmd/src/batch_common.go @@ -12,6 +12,7 @@ import ( "path/filepath" "runtime" "strings" + "syscall" "time" "github.com/mattn/go-isatty" @@ -533,7 +534,7 @@ func checkExecutable(cmd string, args ...string) error { func contextCancelOnInterrupt(parent context.Context) (context.Context, func()) { ctx, ctxCancel := context.WithCancel(parent) c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt) + signal.Notify(c, os.Interrupt, syscall.SIGTERM) go func() { select { diff --git a/cmd/src/batch_preview.go b/cmd/src/batch_preview.go index 088c58046e..9ff1077db2 100644 --- a/cmd/src/batch_preview.go +++ b/cmd/src/batch_preview.go @@ -5,10 +5,10 @@ import ( "flag" "fmt" + "github.com/sourcegraph/sourcegraph/lib/output" + "github.com/sourcegraph/src-cli/internal/batches/ui" "github.com/sourcegraph/src-cli/internal/cmderrors" - - "github.com/sourcegraph/sourcegraph/lib/output" ) func init() {