Skip to content

Commit

Permalink
Ensure suspect if is corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
jspc committed Mar 8, 2022
1 parent 80718c2 commit 215ab18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var installCmd = &cobra.Command{
return fmt.Errorf("missing package(s)")
}

if argCount > 1 && (version != "" || version != "latest") {
if argCount > 1 && (version != "" && version != "latest") {
cmd.Usage()

return fmt.Errorf("setting version with multiple packages makes no sense")
Expand Down
1 change: 1 addition & 0 deletions client/cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func TestRootCmd(t *testing.T) {
{"no args", []string{}, defaultExpect, false},
{"install, missing arg", []string{"install"}, defaultInstall, true},
{"install, error connecting to vind", []string{"install", "foo"}, "", true},
{"install multiple packages, error connecting to vind", []string{"install", "foo", "bar", "baz"}, "", true},
{"reload, error connecting to vind", []string{"reload"}, defaultReload, true},
{"reload, error connecting to vind", []string{"version"}, defaultReload, true},
} {
Expand Down

0 comments on commit 215ab18

Please sign in to comment.