diff options
Diffstat (limited to 'go')
-rw-r--r-- | go/cmd/gitlab-shell/main.go | 7 | ||||
-rw-r--r-- | go/internal/command/commandargs/command_args.go | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/go/cmd/gitlab-shell/main.go b/go/cmd/gitlab-shell/main.go index 9e7f2cb..07623b4 100644 --- a/go/cmd/gitlab-shell/main.go +++ b/go/cmd/gitlab-shell/main.go @@ -41,17 +41,16 @@ func main() { cmd, err := command.New(os.Args, config) if err != nil { - // Failed to build the command, fall back to ruby. // For now this could happen if `SSH_CONNECTION` is not set on // the environment - fmt.Fprintf(os.Stderr, "Failed to build command: %v\n", err) - execRuby() + fmt.Fprintf(os.Stderr, "%v\n", err) + os.Exit(1) } // The command will write to STDOUT on execution or replace the current // process in case of the `fallback.Command` if err = cmd.Execute(); err != nil { - fmt.Fprintf(os.Stderr, "%s\n", err) + fmt.Fprintf(os.Stderr, "%v\n", err) os.Exit(1) } } diff --git a/go/internal/command/commandargs/command_args.go b/go/internal/command/commandargs/command_args.go index 7bc13b6..9e679d3 100644 --- a/go/internal/command/commandargs/command_args.go +++ b/go/internal/command/commandargs/command_args.go @@ -37,15 +37,15 @@ func Parse(arguments []string) (*CommandArgs, error) { return info, nil } -func (info *CommandArgs) parseWho(arguments []string) { +func (c *CommandArgs) parseWho(arguments []string) { for _, argument := range arguments { if keyId := tryParseKeyId(argument); keyId != "" { - info.GitlabKeyId = keyId + c.GitlabKeyId = keyId break } if username := tryParseUsername(argument); username != "" { - info.GitlabUsername = username + c.GitlabUsername = username break } } |