summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2020-07-23 12:37:53 +0000
committerIgor Drozdov <idrozdov@gitlab.com>2020-07-23 12:37:53 +0000
commit869aeb9057962b089abfd8ce0b6d4a0962bbb154 (patch)
treedb3eed91e95fd2e20f75fc97d1cf89f7ca3b7545
parent1aa6bb5f2c219329f241ad529a7c289cd49e7e69 (diff)
downloadgitlab-shell-869aeb9057962b089abfd8ce0b6d4a0962bbb154.tar.gz
Update executable.go
-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
-}