Skip to content

Commit 09a37fc

Browse files
authored
Merge pull request #63 from datum-cloud/fix/resource-cmd-with-no-args
fix: resource cmd with no args panics
2 parents e570f42 + f4e87bb commit 09a37fc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

internal/cmd/utils.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import (
66

77
func WrapResourceCommand(cmd *cobra.Command) *cobra.Command {
88
preRunFunc := func(cmd *cobra.Command, args []string) error {
9+
// if there are not args we let the underline command to deal with it.
10+
if len(args) == 0 {
11+
return nil
12+
}
913
// This mapping helps user during the getting started phase
1014
if args[0] == "organizations" || args[0] == "organization" {
1115
args[0] = "organizationmemberships"

0 commit comments

Comments
 (0)