summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/executable/executable.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/internal/executable/executable.go b/internal/executable/executable.go
index c6355b9..c6253b1 100644
--- a/internal/executable/executable.go
+++ b/internal/executable/executable.go
@@ -13,11 +13,6 @@ const (
AuthorizedPrincipalsCheck = "gitlab-shell-authorized-principals-check"
)
-type Executable struct {
- Name string
- RootDir string
-}
-
var (
// osExecutable is overridden in tests
osExecutable = os.Executable
@@ -41,20 +36,3 @@ func New(name string) (*Executable, error) {
return executable, nil
}
-
-func findRootDir(path string) (string, error) {
- // Start: /opt/.../gitlab-shell/bin/gitlab-shell
- // Ends: /opt/.../gitlab-shell
- rootDir := filepath.Dir(filepath.Dir(path))
- pathFromEnv := os.Getenv("GITLAB_SHELL_DIR")
-
- if pathFromEnv != "" {
- if _, err := os.Stat(pathFromEnv); os.IsNotExist(err) {
- return "", err
- }
-
- rootDir = pathFromEnv
- }
-
- return rootDir, nil
-}