From 1f15fbcfd6b411661d98f9a1fbefbc86b6d6ec9e Mon Sep 17 00:00:00 2001 From: Max Wittig Date: Thu, 23 Dec 2021 12:35:24 +0100 Subject: [PATCH] gitlab-runner: 14.5.2 -> 14.6.0 --- .../gitlab-runner/default.nix | 4 ++-- .../gitlab-runner/fix-shell-path.patch | 17 +++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix index d902b5f4c6a1..a8456d09f989 100644 --- a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix @@ -1,7 +1,7 @@ { lib, buildGoPackage, fetchFromGitLab, fetchurl }: let - version = "14.5.2"; + version = "14.6.0"; in buildGoPackage rec { inherit version; @@ -19,7 +19,7 @@ buildGoPackage rec { owner = "gitlab-org"; repo = "gitlab-runner"; rev = "v${version}"; - sha256 = "07mr9w1rp3rnrlixmqziin1gw78s3gncg47b4z9h9zzpy3acy3xd"; + sha256 = "1sgz8gri51i2pxnzzkcvwx5ncw1rjz7ain82hlcx6f3874qfsniy"; }; patches = [ diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/fix-shell-path.patch b/pkgs/development/tools/continuous-integration/gitlab-runner/fix-shell-path.patch index 8aa419ea5f94..4a3d37be09cd 100644 --- a/pkgs/development/tools/continuous-integration/gitlab-runner/fix-shell-path.patch +++ b/pkgs/development/tools/continuous-integration/gitlab-runner/fix-shell-path.patch @@ -1,28 +1,25 @@ diff --git a/shells/bash.go b/shells/bash.go -index 673f4765..a58cc5e2 100644 +index bd99eca1a..9873dff6b 100644 --- a/shells/bash.go +++ b/shells/bash.go -@@ -5,6 +5,7 @@ import ( +@@ -3,6 +3,7 @@ package shells + import ( "bytes" "fmt" - "io" + "os/exec" "path" "runtime" "strconv" -@@ -225,7 +226,11 @@ func (b *BashShell) GetConfiguration(info common.ShellScriptInfo) (script *commo +@@ -300,7 +301,11 @@ func (b *BashShell) GetConfiguration(info common.ShellScriptInfo) (*common.Shell if info.User != "" { script.Command = "su" if runtime.GOOS == "linux" { - script.Arguments = append(script.Arguments, "-s", "/bin/"+b.Shell) + shellPath, err := exec.LookPath(b.Shell) + if err != nil { -+ shellPath = "/bin/"+b.Shell ++ shellPath = "/bin/" + b.Shell + } + script.Arguments = append(script.Arguments, "-s", shellPath) } - script.Arguments = append(script.Arguments, info.User) - script.Arguments = append(script.Arguments, "-c", shellCommand) --- -2.18.0 - + script.Arguments = append( + script.Arguments,