mirror of https://github.com/databricks/cli.git
Guard against nil
This commit is contained in:
parent
73e6852552
commit
5f63f7488b
|
@ -38,8 +38,10 @@ func (f *syncFlags) syncOptionsFromBundle(cmd *cobra.Command, b *bundle.Bundle)
|
|||
case flags.OutputJSON:
|
||||
outputFunc = sync.JsonOutput
|
||||
}
|
||||
opts.OutputHandler = func(ctx context.Context, c <-chan sync.Event) {
|
||||
outputFunc(ctx, c, cmd.OutOrStdout())
|
||||
if outputFunc != nil {
|
||||
opts.OutputHandler = func(ctx context.Context, c <-chan sync.Event) {
|
||||
outputFunc(ctx, c, cmd.OutOrStdout())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue