aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch')
-rw-r--r--nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch b/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch
new file mode 100644
index 00000000000..64623ae310c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch
@@ -0,0 +1,27 @@
+diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb
+index 0600a18..c46f2d7 100644
+--- a/lib/gitlab_keys.rb
++++ b/lib/gitlab_keys.rb
+@@ -2,7 +2,7 @@ class GitlabKeys # rubocop:disable Metrics/ClassLength
+ attr_accessor :auth_file, :key
+
+ def self.command(whatever)
+- "#{ROOT_PATH}/bin/gitlab-shell #{whatever}"
++ "/run/current-system/sw/bin/gitlab-shell #{whatever}"
+ end
+
+ def self.command_key(key_id)
+diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
+index 2cb76a8..f59ad5e 100644
+--- a/lib/gitlab_shell.rb
++++ b/lib/gitlab_shell.rb
+@@ -195,7 +195,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!
++ Kernel.exec(env, *args, unsetenv_others: true)
+ end
+
+ def api