mirror of https://github.com/databricks/cli.git
Do not show error for ErrAlreadyPrinted (it's already printed)
This commit is contained in:
parent
c9e979b8e5
commit
c8cdc1135a
|
@ -114,10 +114,15 @@ func Execute(ctx context.Context, cmd *cobra.Command) error {
|
|||
if err == nil {
|
||||
logger.Info("completed execution",
|
||||
slog.String("exit_code", "0"))
|
||||
} else if errors.Is(err, ErrAlreadyPrinted) {
|
||||
logger.Debug("failed execution",
|
||||
slog.String("exit_code", "1"),
|
||||
)
|
||||
} else {
|
||||
logger.Error("failed execution",
|
||||
slog.String("exit_code", "1"),
|
||||
slog.String("error", err.Error()))
|
||||
slog.String("error", err.Error()),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue