mirror of https://github.com/databricks/cli.git
whatever
This commit is contained in:
parent
66d32f914f
commit
e66710b200
|
@ -23,15 +23,13 @@ var syncCmd = &cobra.Command{
|
||||||
wsc := prj.WorkspacesClient()
|
wsc := prj.WorkspacesClient()
|
||||||
|
|
||||||
if *remotePath == "" {
|
if *remotePath == "" {
|
||||||
me, err := prj.Me()
|
prjRemotePath, err := prj.RemoteRoot()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
repositoryName, err := git.RepositoryName()
|
*remotePath = prjRemotePath
|
||||||
if err != nil {
|
} else {
|
||||||
return err
|
prj.OverrideRemoteRoot(*remotePath)
|
||||||
}
|
|
||||||
*remotePath = fmt.Sprintf("/Repos/%s/%s", me.UserName, repositoryName)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("[INFO] Remote file sync location: %v", *remotePath)
|
log.Printf("[INFO] Remote file sync location: %v", *remotePath)
|
||||||
|
@ -43,7 +41,7 @@ var syncCmd = &cobra.Command{
|
||||||
return fmt.Errorf("repo not found, please ensure %s exists", *remotePath)
|
return fmt.Errorf("repo not found, please ensure %s exists", *remotePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
root := prj.Root()
|
root := prj.LocalRoot()
|
||||||
syncCallback := getRemoteSyncCallback(ctx, root, *remotePath, wsc)
|
syncCallback := getRemoteSyncCallback(ctx, root, *remotePath, wsc)
|
||||||
err = spawnSyncRoutine(ctx, *interval, syncCallback, *remotePath)
|
err = spawnSyncRoutine(ctx, *interval, syncCallback, *remotePath)
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue