summaryrefslogtreecommitdiff
path: root/go/cmd/gitlab-shell/main.go
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-05-22 12:28:25 +0000
committerNick Thomas <nick@gitlab.com>2019-05-22 12:28:25 +0000
commit48142b98ca9565698632c44e72e29e22b9c923c3 (patch)
treef2d007cb411667045ffc26278d7345bf19f362e9 /go/cmd/gitlab-shell/main.go
parent58d8c7691ac52c00dfebe2154e793c8fccc46aa0 (diff)
parentb77a375205af394945de99c3f7318292510c3245 (diff)
downloadgitlab-shell-48142b98ca9565698632c44e72e29e22b9c923c3.tar.gz
Merge branch 'id-go-refactorings' into 'master'
Refactor execution and parsing logic in Go's implementation See merge request gitlab-org/gitlab-shell!302
Diffstat (limited to 'go/cmd/gitlab-shell/main.go')
-rw-r--r--go/cmd/gitlab-shell/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/go/cmd/gitlab-shell/main.go b/go/cmd/gitlab-shell/main.go
index 6e39d8b..a8aef75 100644
--- a/go/cmd/gitlab-shell/main.go
+++ b/go/cmd/gitlab-shell/main.go
@@ -29,7 +29,7 @@ func findRootDir() (string, error) {
func execRuby(rootDir string, readWriter *readwriter.ReadWriter) {
cmd := &fallback.Command{RootDir: rootDir, Args: os.Args}
- if err := cmd.Execute(readWriter); err != nil {
+ if err := cmd.Execute(); err != nil {
fmt.Fprintf(readWriter.ErrOut, "Failed to exec: %v\n", err)
os.Exit(1)
}
@@ -56,7 +56,7 @@ func main() {
execRuby(rootDir, readWriter)
}
- cmd, err := command.New(os.Args, config)
+ cmd, err := command.New(os.Args, config, readWriter)
if err != nil {
// For now this could happen if `SSH_CONNECTION` is not set on
// the environment
@@ -66,7 +66,7 @@ func main() {
// The command will write to STDOUT on execution or replace the current
// process in case of the `fallback.Command`
- if err = cmd.Execute(readWriter); err != nil {
+ if err = cmd.Execute(); err != nil {
fmt.Fprintf(readWriter.ErrOut, "%v\n", err)
os.Exit(1)
}