sync options redefine better

This commit is contained in:
Shreyas Goenka 2023-06-02 00:04:18 +02:00
parent 1244b3a414
commit 2303f20f95
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
3 changed files with 13 additions and 5 deletions

View File

@ -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)
}

View File

@ -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
}

View File

@ -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 {