forked from mirrors/nixpkgs
Merge pull request #151881 from max-wittig/gitlab-runner-14-6-0
gitlab-runner: 14.5.2 -> 14.6.0
This commit is contained in:
commit
8b3fbab072
|
@ -1,7 +1,7 @@
|
||||||
{ lib, buildGoPackage, fetchFromGitLab, fetchurl }:
|
{ lib, buildGoPackage, fetchFromGitLab, fetchurl }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "14.5.2";
|
version = "14.6.0";
|
||||||
in
|
in
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
inherit version;
|
inherit version;
|
||||||
|
@ -19,7 +19,7 @@ buildGoPackage rec {
|
||||||
owner = "gitlab-org";
|
owner = "gitlab-org";
|
||||||
repo = "gitlab-runner";
|
repo = "gitlab-runner";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "07mr9w1rp3rnrlixmqziin1gw78s3gncg47b4z9h9zzpy3acy3xd";
|
sha256 = "1sgz8gri51i2pxnzzkcvwx5ncw1rjz7ain82hlcx6f3874qfsniy";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -1,28 +1,25 @@
|
||||||
diff --git a/shells/bash.go b/shells/bash.go
|
diff --git a/shells/bash.go b/shells/bash.go
|
||||||
index 673f4765..a58cc5e2 100644
|
index bd99eca1a..9873dff6b 100644
|
||||||
--- a/shells/bash.go
|
--- a/shells/bash.go
|
||||||
+++ b/shells/bash.go
|
+++ b/shells/bash.go
|
||||||
@@ -5,6 +5,7 @@ import (
|
@@ -3,6 +3,7 @@ package shells
|
||||||
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
+ "os/exec"
|
+ "os/exec"
|
||||||
"path"
|
"path"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"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 != "" {
|
if info.User != "" {
|
||||||
script.Command = "su"
|
script.Command = "su"
|
||||||
if runtime.GOOS == "linux" {
|
if runtime.GOOS == "linux" {
|
||||||
- script.Arguments = append(script.Arguments, "-s", "/bin/"+b.Shell)
|
- script.Arguments = append(script.Arguments, "-s", "/bin/"+b.Shell)
|
||||||
+ shellPath, err := exec.LookPath(b.Shell)
|
+ shellPath, err := exec.LookPath(b.Shell)
|
||||||
+ if err != nil {
|
+ if err != nil {
|
||||||
+ shellPath = "/bin/"+b.Shell
|
+ shellPath = "/bin/" + b.Shell
|
||||||
+ }
|
+ }
|
||||||
+ script.Arguments = append(script.Arguments, "-s", shellPath)
|
+ script.Arguments = append(script.Arguments, "-s", shellPath)
|
||||||
}
|
}
|
||||||
script.Arguments = append(script.Arguments, info.User)
|
script.Arguments = append(
|
||||||
script.Arguments = append(script.Arguments, "-c", shellCommand)
|
script.Arguments,
|
||||||
--
|
|
||||||
2.18.0
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue