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:
|
case flags.OutputJSON:
|
||||||
outputFunc = sync.JsonOutput
|
outputFunc = sync.JsonOutput
|
||||||
}
|
}
|
||||||
opts.OutputHandler = func(ctx context.Context, c <-chan sync.Event) {
|
if outputFunc != nil {
|
||||||
outputFunc(ctx, c, cmd.OutOrStdout())
|
opts.OutputHandler = func(ctx context.Context, c <-chan sync.Event) {
|
||||||
|
outputFunc(ctx, c, cmd.OutOrStdout())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue