diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2019-05-20 10:09:56 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2019-05-20 13:03:11 +0300 |
commit | 60280bbfc1a1cfb591bf01f3a06e828dcf97728a (patch) | |
tree | e374fb22294861082fa6fc82098b2db3d0ebb856 /go/cmd/gitlab-shell | |
parent | 58d8c7691ac52c00dfebe2154e793c8fccc46aa0 (diff) | |
download | gitlab-shell-60280bbfc1a1cfb591bf01f3a06e828dcf97728a.tar.gz |
Pass readWriter to Command constructor
Diffstat (limited to 'go/cmd/gitlab-shell')
-rw-r--r-- | go/cmd/gitlab-shell/main.go | 6 |
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) } |