mirror of https://github.com/databricks/cli.git
sync options redefine better
This commit is contained in:
parent
1244b3a414
commit
2303f20f95
|
@ -21,6 +21,9 @@ func getSync(ctx context.Context, b *bundle.Bundle) (*sync.Sync, error) {
|
|||
|
||||
SnapshotBasePath: cacheDir,
|
||||
WorkspaceClient: b.WorkspaceClient(),
|
||||
|
||||
PersistSnapshot: true,
|
||||
AllowOverwrites: true,
|
||||
}
|
||||
return sync.New(ctx, opts)
|
||||
}
|
||||
|
|
|
@ -25,6 +25,9 @@ func syncOptionsFromBundle(cmd *cobra.Command, b *bundle.Bundle) (*sync.SyncOpti
|
|||
|
||||
SnapshotBasePath: cacheDir,
|
||||
WorkspaceClient: b.WorkspaceClient(),
|
||||
|
||||
PersistSnapshot: true,
|
||||
AllowOverwrites: true,
|
||||
}
|
||||
return &opts, nil
|
||||
}
|
||||
|
|
|
@ -35,7 +35,9 @@ var importDirCmd = &cobra.Command{
|
|||
RemotePath: targetPath,
|
||||
Full: true,
|
||||
WorkspaceClient: databricks.Must(databricks.NewWorkspaceClient()),
|
||||
DisallowOverwrites: !importDirOverwrite,
|
||||
|
||||
AllowOverwrites: importDirOverwrite,
|
||||
PersistSnapshot: false,
|
||||
}
|
||||
s, err := sync.New(ctx, opts)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue