cmd/uplink: print user-friendly FATAL errors.

Change-Id: I9147a83bec2defa854e52aecbd9658e56e2aa123
This commit is contained in:
Fadila Khadar 2020-01-21 14:25:03 +01:00 committed by Kaloyan Raev
parent 3b86917cc9
commit b2c454dbd6

View File

@ -319,8 +319,9 @@ func cleanup(cmd *cobra.Command, loadConfig func(cmd *cobra.Command, vip *viper.
err = workErr err = workErr
if err != nil { if err != nil {
// This function call os.Exit(1) logger.Debug("Unrecoverable error", zap.Error(err))
logger.Fatal("Unrecoverable error", zap.Error(err)) fmt.Println("Error:", err.Error())
os.Exit(1)
} }
return nil return nil