nixpkgs/pkgs/applications/version-management/gitlab-shell/remove-hardcoded-locations.patch

28 lines
925 B
Diff
Raw Normal View History

2018-01-07 03:58:31 +00:00
diff --git a/go/internal/config/config.go b/go/internal/config/config.go
index c57b4de..88cfc95 100644
--- a/go/internal/config/config.go
+++ b/go/internal/config/config.go
@@ -27,7 +27,7 @@ func New() (*Config, error) {
}
cfg.RootDir = dir
- configBytes, err := ioutil.ReadFile(path.Join(cfg.RootDir, configFile))
+ configBytes, err := ioutil.ReadFile("/run/gitlab/shell-config.yml")
2018-01-07 03:58:31 +00:00
if err != nil {
return nil, err
}
2018-03-14 13:04:39 +00:00
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 1452f95..2b40327 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -180,7 +180,8 @@ class GitlabShell
end
# We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is.
2018-04-25 18:55:58 +01:00
- Kernel.exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH)
2018-03-14 13:04:39 +00:00
+ # Except we don't, because we're already in the right directory on nixos!
2018-04-25 18:55:58 +01:00
+ Kernel.exec(env, *args, unsetenv_others: true)
2018-03-14 13:04:39 +00:00
end
def api