From 220bb45d747504dcd34089005591b7c7d99c8940 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Tue, 4 Jun 2019 15:28:47 +0100 Subject: Respect GITLAB_SHELL_DIR in the Go version --- go/cmd/gitlab-shell/main.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'go/cmd/gitlab-shell/main.go') 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 -- cgit v1.2.1