mirror of https://github.com/databricks/cli.git
## Changes This snuck into #1532 right before merging. The result is that error output is no longer logged. This includes actual execution errors as well as help output if arguments or flags are incorrectly specified. We don't have test coverage for the `root.Execute` function. This is to be fixed later. ## Tests Manually confirmed we observe error output again.
This commit is contained in:
parent
2a73d7788b
commit
7d2aa35738
|
@ -98,7 +98,7 @@ func Execute(cmd *cobra.Command) {
|
||||||
|
|
||||||
// Run the command
|
// Run the command
|
||||||
cmd, err := cmd.ExecuteContextC(ctx)
|
cmd, err := cmd.ExecuteContextC(ctx)
|
||||||
if err != nil && errors.Is(err, ErrAlreadyPrinted) {
|
if err != nil && !errors.Is(err, ErrAlreadyPrinted) {
|
||||||
// If cmdio logger initialization succeeds, then this function logs with the
|
// If cmdio logger initialization succeeds, then this function logs with the
|
||||||
// initialized cmdio logger, otherwise with the default cmdio logger
|
// initialized cmdio logger, otherwise with the default cmdio logger
|
||||||
cmdio.LogError(cmd.Context(), err)
|
cmdio.LogError(cmd.Context(), err)
|
||||||
|
|
Loading…
Reference in New Issue