summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-09-08 09:54:44 +0000
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-09-08 09:54:44 +0000
commit8b4621aa6cba1674192ffb6e3c3e801a567f2516 (patch)
tree734e8bd67a8a14d4c9d87c049638f0a8d38171b3 /cmd
parent4f5b7512c3c1ad7b67b044976b5ac3aae413beb2 (diff)
downloadgitlab-shell-8b4621aa6cba1674192ffb6e3c3e801a567f2516.tar.gz
refactor: add acceptargs field to executable
parse logic will only run if the executable accept args. healthcheck is the only one not accepting arguments.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/check/main.go2
-rw-r--r--cmd/gitlab-shell-authorized-keys-check/main.go2
-rw-r--r--cmd/gitlab-shell-authorized-principals-check/main.go2
-rw-r--r--cmd/gitlab-shell/main.go2
4 files changed, 4 insertions, 4 deletions
diff --git a/cmd/check/main.go b/cmd/check/main.go
index a6a8fa3..44d8175 100644
--- a/cmd/check/main.go
+++ b/cmd/check/main.go
@@ -19,7 +19,7 @@ func main() {
ErrOut: os.Stderr,
}
- executable, err := executable.New(executable.Healthcheck)
+ executable, err := executable.New(executable.Healthcheck, false)
if err != nil {
fmt.Fprintln(readWriter.ErrOut, "Failed to determine executable, exiting")
os.Exit(1)
diff --git a/cmd/gitlab-shell-authorized-keys-check/main.go b/cmd/gitlab-shell-authorized-keys-check/main.go
index 81937a7..cda3e0b 100644
--- a/cmd/gitlab-shell-authorized-keys-check/main.go
+++ b/cmd/gitlab-shell-authorized-keys-check/main.go
@@ -20,7 +20,7 @@ func main() {
ErrOut: os.Stderr,
}
- executable, err := executable.New(executable.AuthorizedKeysCheck)
+ executable, err := executable.New(executable.AuthorizedKeysCheck, true)
if err != nil {
fmt.Fprintln(readWriter.ErrOut, "Failed to determine executable, exiting")
os.Exit(1)
diff --git a/cmd/gitlab-shell-authorized-principals-check/main.go b/cmd/gitlab-shell-authorized-principals-check/main.go
index 8d0aba8..87f7fa3 100644
--- a/cmd/gitlab-shell-authorized-principals-check/main.go
+++ b/cmd/gitlab-shell-authorized-principals-check/main.go
@@ -20,7 +20,7 @@ func main() {
ErrOut: os.Stderr,
}
- executable, err := executable.New(executable.AuthorizedPrincipalsCheck)
+ executable, err := executable.New(executable.AuthorizedPrincipalsCheck, true)
if err != nil {
fmt.Fprintln(readWriter.ErrOut, "Failed to determine executable, exiting")
os.Exit(1)
diff --git a/cmd/gitlab-shell/main.go b/cmd/gitlab-shell/main.go
index e139ab7..fe52bfc 100644
--- a/cmd/gitlab-shell/main.go
+++ b/cmd/gitlab-shell/main.go
@@ -34,7 +34,7 @@ func main() {
ErrOut: os.Stderr,
}
- executable, err := executable.New(executable.GitlabShell)
+ executable, err := executable.New(executable.GitlabShell, true)
if err != nil {
fmt.Fprintln(readWriter.ErrOut, "Failed to determine executable, exiting")
os.Exit(1)