From 0bb5400510e07c6401767b91a7129c76f9097679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Guimar=C3=A3es?= Date: Tue, 19 May 2020 12:25:13 -0300 Subject: [PATCH] fix pwd --- pkg/formula/formula.go | 1 + pkg/formula/runner.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkg/formula/formula.go b/pkg/formula/formula.go index 7abf7dd2a..8cf013d1e 100644 --- a/pkg/formula/formula.go +++ b/pkg/formula/formula.go @@ -13,6 +13,7 @@ const ( DefaultConfig = "config.json" ConfigPattern = "%s/%s" CommandEnv = "COMMAND" + PwdEnv = "PWD" BinPattern = "%s%s" BinPathPattern = "%s/bin" windows = "windows" diff --git a/pkg/formula/runner.go b/pkg/formula/runner.go index f59294736..be0f872b7 100644 --- a/pkg/formula/runner.go +++ b/pkg/formula/runner.go @@ -130,6 +130,8 @@ func (d DefaultRunner) Run(def Definition) error { if err := d.inputs(cmd, fPath, &config); err != nil { return err } + ePwd := fmt.Sprintf(EnvPattern, PwdEnv, cPwd) + cmd.Env = append(cmd.Env, ePwd) if err := cmd.Start(); err != nil { return err