mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Extended checking if error is context cancelling
This commit is contained in:
parent
ac7904668f
commit
f6f51799d7
1 changed files with 2 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -59,7 +60,7 @@ func Execute() {
|
|||
}
|
||||
}()
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
if err != context.Canceled {
|
||||
if !strings.HasSuffix(err.Error(), context.Canceled.Error()) {
|
||||
out.Exit("An error occurred: %v", err)
|
||||
}
|
||||
os.Exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue