From 1f61d8d83a49c2be878664110abfb410b5c61af5 Mon Sep 17 00:00:00 2001 From: Srevin Saju Date: Tue, 19 Sep 2023 15:00:36 +0300 Subject: [PATCH] fix(macro): regression introduced by adding the chdir flag --- pkg/ci/stage_run.go | 2 +- pkg/ci/stage_schema.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ci/stage_run.go b/pkg/ci/stage_run.go index 58a506c..96a64b6 100644 --- a/pkg/ci/stage_run.go +++ b/pkg/ci/stage_run.go @@ -132,7 +132,7 @@ func (s *Stage) expandMacros(ctx context.Context) (*Stage, hcl.Diagnostics) { } chdir := true if chdirRaw.IsNull() { - chdir = true + chdir = false } else if chdirRaw.Type() == cty.Bool { chdir = chdirRaw.True() } diff --git a/pkg/ci/stage_schema.go b/pkg/ci/stage_schema.go index 48e0d86..441c4a2 100644 --- a/pkg/ci/stage_schema.go +++ b/pkg/ci/stage_schema.go @@ -95,7 +95,7 @@ type StageUse struct { Macro hcl.Expression `hcl:"macro" json:"macro"` Parameters hcl.Expression `hcl:"parameters,optional" json:"parameters"` - Chdir hcl.Expression `hcl:"Chdir,optional" json:"chdir"` + Chdir hcl.Expression `hcl:"chdir,optional" json:"chdir"` } // StageDaemon configures the daemon properties and lifecycle of a daemon