fix #134 - support 'env' context in steps

This commit is contained in:
Casey Lee
2020-03-06 13:39:01 -08:00
parent 4fde7d8865
commit 87392c2ed7
4 changed files with 14 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ import (
"github.com/robertkrimen/otto"
"github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"gopkg.in/godo.v2/glob"
)
@@ -240,6 +241,7 @@ func (rc *RunContext) vmGithub() func(*otto.Otto) {
func (sc *StepContext) vmEnv() func(*otto.Otto) {
return func(vm *otto.Otto) {
log.Debugf("context env => %v", sc.Env)
_ = vm.Set("env", sc.Env)
}
}