We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3038ae4 + 3a8bab4 commit 4989011Copy full SHA for 4989011
cmd/gitlab-shell/main.go
@@ -5,6 +5,9 @@ import (
5
"os"
6
"reflect"
7
8
+ grpccodes "google.golang.org/grpc/codes"
9
+ grpcstatus "google.golang.org/grpc/status"
10
+
11
"gitlab.com/gitlab-org/labkit/log"
12
13
shellCmd "gitlab.com/gitlab-org/gitlab-shell/cmd/gitlab-shell/command"
@@ -71,7 +74,9 @@ func main() {
71
74
72
75
if err := cmd.Execute(ctx); err != nil {
73
76
ctxlog.WithError(err).Warn("gitlab-shell: main: command execution failed")
- console.DisplayWarningMessage(err.Error(), readWriter.ErrOut)
77
+ if grpcstatus.Convert(err).Code() != grpccodes.Internal {
78
+ console.DisplayWarningMessage(err.Error(), readWriter.ErrOut)
79
+ }
80
os.Exit(1)
81
}
82
0 commit comments