Skip to content

Commit

Permalink
mr_show: Fix --patch option with no arguments
Browse files Browse the repository at this point in the history
The current code still assumes a minimum of one argument (the MR ID),
but we can determine that automatically nowadays.
  • Loading branch information
fmuellner committed Dec 15, 2020
1 parent fc59658 commit 4aadd27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/mr_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var mrShowCmd = &cobra.Command{
if mrShowPatch {
var remote string

if len(args) == 1 {
if len(args) < 2 {
remote = findLocalRemote(mr.TargetProjectID)
} else if len(args) == 2 {
remote = args[0]
Expand Down

0 comments on commit 4aadd27

Please sign in to comment.