fix: Reuse existing `root` variable

This commit is contained in:
Ilya Kuznetsov 2024-11-18 16:19:26 +01:00
parent 00bb683be9
commit e8825d559f
No known key found for this signature in database
GPG Key ID: 91F3DDCF5D21CDDF
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
root := b.SyncRootPath root := b.SyncRootPath
isInWorkspace := strings.HasPrefix(root, "/Workspace/") isInWorkspace := strings.HasPrefix(root, "/Workspace/")
if isInWorkspace && dbr.RunsOnRuntime(ctx) { if isInWorkspace && dbr.RunsOnRuntime(ctx) {
b.Config.Workspace.FilePath = b.SyncRootPath b.Config.Workspace.FilePath = root
} else { } else {
disabled := false disabled := false
b.Config.Presets.InPlaceDeployment = &disabled b.Config.Presets.InPlaceDeployment = &disabled