Skip to content

Commit baf33c8

Browse files
authored
[devbox shell] fix parsing of cmd and path (#173)
## Summary fixes parsing of the path/to/devbox/json and the command to be invoked ## How was it tested? ``` > cd testdata/zig/ > devbox shell zig-hello-world > devbox shell zig-hello-world -- zig help > devbox shell -- zig help ```
1 parent 9cea339 commit baf33c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

boxcli/shell.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ func validateShellArgs(cmd *cobra.Command, args []string) error {
6868
func parseShellArgs(cmd *cobra.Command, args []string) (string, []string) {
6969
index := cmd.ArgsLenAtDash()
7070
if index < 0 {
71-
index = 0
71+
return pathArg(args), []string{}
7272
}
7373

7474
path := pathArg(args[:index])
7575
cmds := args[index:]
76+
7677
return path, cmds
7778
}

0 commit comments

Comments
 (0)