gitlab-runner: 14.5.2 -> 14.6.0
This commit is contained in:
parent
56c2f8f1cc
commit
1f15fbcfd6
2 changed files with 9 additions and 12 deletions
|
@ -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 = [
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue