Skip to content

Commit 5488f34

Browse files
committed
Default to current directory for open-in-code
1 parent 0314274 commit 5488f34

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/devcontainer/openincode.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ func createOpenInCodeInsidersCommand() *cobra.Command {
3333
}
3434

3535
func launchDevContainer(cmd *cobra.Command, appBase string, args []string) error {
36-
if len(args) != 1 {
36+
if len(args) > 1 {
3737
return cmd.Usage()
3838
}
39-
path := args[0]
39+
path := "." // default to current directory
40+
if len(args) == 1 {
41+
path = args[0]
42+
}
4043

4144
launchURI, err := devcontainers.GetDevContainerURI(path)
4245
if err != nil {

0 commit comments

Comments
 (0)