Skip to content

Commit

Permalink
fix: parse arguments for subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
dreadl0ck committed Sep 4, 2021
1 parent 7a209ff commit 1addb08
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,16 @@ func (c *command) getDeepDependencies(argValues map[string]string) (deps []strin
depCmd, err := cmdMap.getCommand(depFields[0])
if err == nil {

// found it - get its dependencies, don't pass down the argValues as these are only valid for the current command
dps, err := depCmd.getDeepDependencies(nil)
Log.Debug("getDeepDependencies: ", depCmd.name, " parseArguments: ", depFields[1:])

// parse args for command
_, args, err := depCmd.parseArguments(depFields[1:])
if err != nil {
return nil, err
}

// get it's dependencies
dps, err := depCmd.getDeepDependencies(args)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1addb08

Please sign in to comment.