Skip to content

Commit 6b436f8

Browse files
authored
Merge pull request #52 from stuartleeks/sl/open-current-dir
Default to current directory for `open-in-code`
2 parents 0314274 + 5488f34 commit 6b436f8

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)