Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RyazanovAlexander committed Feb 11, 2022
1 parent c00a563 commit c41b7e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"showLog": true,
"args": ["environment", "deploy", "--namespace", "test"],
"args": ["release", "-h"],
"env": {
"PRODCTL_BUNDLE_DIR_PATH": "fakes/.bundle",
},
Expand Down
8 changes: 7 additions & 1 deletion internal/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,14 @@ func createCommandTree(curDir string, command *Command) {

for _, fileInfo := range dirs {
if fileInfo.IsDir() {
fParts := strings.Split(fileInfo.Name(), ".")
name := fParts[0]
if len(fParts) > 1 {
name = fParts[1]
}

dirCommand := &Command{
Name: fileInfo.Name(),
Name: name,
}

command.SubCommands = append(command.SubCommands, dirCommand)
Expand Down

0 comments on commit c41b7e2

Please sign in to comment.