From a9b3d6426b3ca8d57bd7357e2f051ec0f5d1f6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cat=E2=84=A2?= Date: Tue, 12 Jan 2021 06:27:16 +0000 Subject: [PATCH] Use static initial PATH (#462) --- pkg/runner/step_context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/runner/step_context.go b/pkg/runner/step_context.go index 75542b0..e135c9b 100644 --- a/pkg/runner/step_context.go +++ b/pkg/runner/step_context.go @@ -93,8 +93,8 @@ func (sc *StepContext) setupEnv() common.Executor { } if (rc.ExtraPath != nil) && (len(rc.ExtraPath) > 0) { - s := append(rc.ExtraPath, os.Getenv("PATH")) - env["PATH"] = strings.Join(s, string(os.PathListSeparator)) + s := append(rc.ExtraPath, `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin`) + env["PATH"] = strings.Join(s, `:`) } for k, v := range env {