From 26f24538eeda35ce8b65c278ef06f95fad4c4640 Mon Sep 17 00:00:00 2001 From: Ilya Kuznetsov Date: Thu, 14 Nov 2024 18:18:17 +0100 Subject: [PATCH] feat: Use dbr package for runtime check --- bundle/config/mutator/apply_presets.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bundle/config/mutator/apply_presets.go b/bundle/config/mutator/apply_presets.go index 637800913..ca0869b58 100644 --- a/bundle/config/mutator/apply_presets.go +++ b/bundle/config/mutator/apply_presets.go @@ -223,11 +223,8 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos } if config.IsExplicitlyEnabled((b.Config.Presets.InPlaceDeployment)) { - root := b.SyncRoot.Native() - _, ok := env.Lookup(ctx, envDatabricksRuntimeVersion) isInWorkspace := ok && strings.HasPrefix(root, "/Workspace/") - - if isInWorkspace { + if isInWorkspace && dbr.RunsOnRuntime(ctx) { b.Config.Workspace.FilePath = b.SyncRootPath } else { disabled := false