summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go/cmd/gitlab-shell/main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/go/cmd/gitlab-shell/main.go b/go/cmd/gitlab-shell/main.go
index a8aef75..f4d519f 100644
--- a/go/cmd/gitlab-shell/main.go
+++ b/go/cmd/gitlab-shell/main.go
@@ -14,6 +14,10 @@ import (
// findRootDir determines the root directory (and so, the location of the config
// file) from os.Executable()
func findRootDir() (string, error) {
+ if path := os.Getenv("GITLAB_SHELL_DIR"); path != "" {
+ return path, nil
+ }
+
path, err := os.Executable()
if err != nil {
return "", err