mirror of https://github.com/databricks/cli.git
feat: Use dbr package for runtime check
This commit is contained in:
parent
0004ed27a7
commit
26f24538ee
|
@ -223,11 +223,8 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.IsExplicitlyEnabled((b.Config.Presets.InPlaceDeployment)) {
|
if config.IsExplicitlyEnabled((b.Config.Presets.InPlaceDeployment)) {
|
||||||
root := b.SyncRoot.Native()
|
|
||||||
_, ok := env.Lookup(ctx, envDatabricksRuntimeVersion)
|
|
||||||
isInWorkspace := ok && strings.HasPrefix(root, "/Workspace/")
|
isInWorkspace := ok && strings.HasPrefix(root, "/Workspace/")
|
||||||
|
if isInWorkspace && dbr.RunsOnRuntime(ctx) {
|
||||||
if isInWorkspace {
|
|
||||||
b.Config.Workspace.FilePath = b.SyncRootPath
|
b.Config.Workspace.FilePath = b.SyncRootPath
|
||||||
} else {
|
} else {
|
||||||
disabled := false
|
disabled := false
|
||||||
|
|
Loading…
Reference in New Issue