diff --git a/cmd/gb/main.go b/cmd/gb/main.go index 6d3211c..1c65f59 100644 --- a/cmd/gb/main.go +++ b/cmd/gb/main.go @@ -133,6 +133,9 @@ func main() { log.Debugf("args: %v", args) if err := command.Run(ctx, args); err != nil { + if !noDestroyContext { + ctx.Destroy() + } log.Fatalf("command %q failed: %v", name, err) } }