gitlab-shell: 8.3.3 -> 8.4.1

This commit is contained in:
Florian Klink 2018-11-23 15:29:38 +01:00
parent 625e66d879
commit 293a631081
2 changed files with 32 additions and 14 deletions

View file

@ -1,14 +1,14 @@
{ stdenv, ruby, bundler, fetchFromGitLab, go }:
stdenv.mkDerivation rec {
version = "8.3.3";
version = "8.4.1";
name = "gitlab-shell-${version}";
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitlab-shell";
rev = "v${version}";
sha256 = "1qapw0yvlw1nxjik7jpbbbl3yx299sfvdx67zsd5ai7bhk1gd8xl";
sha256 = "00jzrpdfqgrba2qi5ngc0g07p7gmip7my563hw542gg8l88d27xq";
};
buildInputs = [ ruby bundler go ];

View file

@ -1,23 +1,41 @@
diff --git a/go/internal/config/config.go b/go/internal/config/config.go
index c57b4de..88cfc95 100644
index 435cb29..078c1df 100644
--- a/go/internal/config/config.go
+++ b/go/internal/config/config.go
@@ -27,7 +27,7 @@ func New() (*Config, error) {
}
cfg.RootDir = dir
@@ -2,7 +2,6 @@ package config
- configBytes, err := ioutil.ReadFile(path.Join(cfg.RootDir, configFile))
+ configBytes, err := ioutil.ReadFile("/run/gitlab/shell-config.yml")
if err != nil {
return nil, err
}
import (
"io/ioutil"
- "os"
"path"
yaml "gopkg.in/yaml.v2"
@@ -26,16 +25,13 @@ type Config struct {
}
func New() (*Config, error) {
- dir, err := os.Getwd()
- if err != nil {
- return nil, err
- }
+ dir := "/run/gitlab"
return NewFromDir(dir)
}
func NewFromDir(dir string) (*Config, error) {
- return newFromFile(path.Join(dir, configFile))
+ return newFromFile(path.Join(dir, "shell-config.yml"))
}
func newFromFile(filename string) (*Config, error) {
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 1452f95..2b40327 100644
index 57c70f5..700569b 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -180,7 +180,8 @@ class GitlabShell
end
@@ -187,7 +187,8 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
args = [executable, gitaly_address, json_args]
# We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is.
- Kernel.exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH)
+ # Except we don't, because we're already in the right directory on nixos!