From 1a2a864b7c3081be941c36f24b1dde1e60ca7ad2 Mon Sep 17 00:00:00 2001 From: Berger Eugene Date: Fri, 15 Dec 2023 16:24:20 +0200 Subject: [PATCH] BugFix - Fix template rendering for commands --- issues/issue_120/process-compose.yaml | 11 +++++++++++ src/loader/loader.go | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 issues/issue_120/process-compose.yaml diff --git a/issues/issue_120/process-compose.yaml b/issues/issue_120/process-compose.yaml new file mode 100644 index 0000000..2b60f58 --- /dev/null +++ b/issues/issue_120/process-compose.yaml @@ -0,0 +1,11 @@ +version: "0.5" + +environment: + - "I_AM_GLOBAL_EV=5" +vars: + EV: 5 + +processes: + process1: + description: This process will sleep for 2 seconds + command: "echo {{ .EV }} > /tmp/output" diff --git a/src/loader/loader.go b/src/loader/loader.go index d8c2788..4bcd8d6 100644 --- a/src/loader/loader.go +++ b/src/loader/loader.go @@ -37,7 +37,6 @@ func Load(opts *LoaderOptions) (*types.Project, error) { assignDefaultProcessValues, cloneReplicas, copyWorkingDirToProbes, - assignExecutableAndArgs, ) err = applyWithErr(mergedProject, renderTemplates, @@ -45,6 +44,9 @@ func Load(opts *LoaderOptions) (*types.Project, error) { if err != nil { return nil, err } + apply(mergedProject, + assignExecutableAndArgs, + ) err = validate(mergedProject, validateLogLevel,