From cc369e2f73e84596a936d602a7e112d849e6e6fa Mon Sep 17 00:00:00 2001 From: Denys Vitali Date: Mon, 20 Jul 2020 21:17:12 +0200 Subject: [PATCH] fix: add default values in vmInput --- pkg/runner/expression.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/runner/expression.go b/pkg/runner/expression.go index f12c6ef..c0ce3a0 100644 --- a/pkg/runner/expression.go +++ b/pkg/runner/expression.go @@ -296,6 +296,14 @@ func (sc *StepContext) vmEnv() func(*otto.Otto) { func (sc *StepContext) vmInputs() func(*otto.Otto) { inputs := make(map[string]string) + + // Set Defaults + if sc.Action != nil { + for k, input := range sc.Action.Inputs { + inputs[k] = input.Default + } + } + for k, v := range sc.Step.With { inputs[k] = v }