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,
|
SnapshotBasePath: cacheDir,
|
||||||
WorkspaceClient: b.WorkspaceClient(),
|
WorkspaceClient: b.WorkspaceClient(),
|
||||||
|
|
||||||
|
PersistSnapshot: true,
|
||||||
|
AllowOverwrites: true,
|
||||||
}
|
}
|
||||||
return sync.New(ctx, opts)
|
return sync.New(ctx, opts)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,9 @@ func syncOptionsFromBundle(cmd *cobra.Command, b *bundle.Bundle) (*sync.SyncOpti
|
||||||
|
|
||||||
SnapshotBasePath: cacheDir,
|
SnapshotBasePath: cacheDir,
|
||||||
WorkspaceClient: b.WorkspaceClient(),
|
WorkspaceClient: b.WorkspaceClient(),
|
||||||
|
|
||||||
|
PersistSnapshot: true,
|
||||||
|
AllowOverwrites: true,
|
||||||
}
|
}
|
||||||
return &opts, nil
|
return &opts, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,9 @@ var importDirCmd = &cobra.Command{
|
||||||
RemotePath: targetPath,
|
RemotePath: targetPath,
|
||||||
Full: true,
|
Full: true,
|
||||||
WorkspaceClient: databricks.Must(databricks.NewWorkspaceClient()),
|
WorkspaceClient: databricks.Must(databricks.NewWorkspaceClient()),
|
||||||
DisallowOverwrites: !importDirOverwrite,
|
|
||||||
|
AllowOverwrites: importDirOverwrite,
|
||||||
|
PersistSnapshot: false,
|
||||||
}
|
}
|
||||||
s, err := sync.New(ctx, opts)
|
s, err := sync.New(ctx, opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue