diff --git a/cmd/entire/main.go b/cmd/entire/main.go index caad2ea9d..e1adc1690 100644 --- a/cmd/entire/main.go +++ b/cmd/entire/main.go @@ -1,33 +1,18 @@ package main import ( - "context" "errors" "fmt" "os" - "os/signal" "strings" - "syscall" "github.com/entireio/cli/cmd/entire/cli" "github.com/spf13/cobra" ) func main() { - // Create context that cancels on interrupt - ctx, cancel := context.WithCancel(context.Background()) - - // Handle interrupt signals - sigChan := make(chan os.Signal, 1) - signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM) - go func() { - <-sigChan - cancel() - }() - - // Create and execute root command rootCmd := cli.NewRootCmd() - err := rootCmd.ExecuteContext(ctx) + err := rootCmd.Execute() if err != nil { var silent *cli.SilentError @@ -41,10 +26,8 @@ func main() { fmt.Fprintln(rootCmd.OutOrStderr(), err) } - cancel() os.Exit(1) } - cancel() // Cleanup on successful exit } func showSuggestion(cmd *cobra.Command, err error) {