Skip to content

Commit 13d8905

Browse files
Change open cmd to default to current directory (#1070)
fixes #1069 Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
1 parent 33ce248 commit 13d8905

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cmd/open.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ var openCmd = &cobra.Command{
1515
1616
Pass the path to the directory that contains the solution you want to see on the website.
1717
`,
18-
Args: cobra.ExactArgs(1),
18+
Args: cobra.MaximumNArgs(1),
1919
RunE: func(cmd *cobra.Command, args []string) error {
20-
metadata, err := workspace.NewExerciseMetadata(args[0])
20+
path := "."
21+
if len(args) == 1 {
22+
path = args[0]
23+
}
24+
metadata, err := workspace.NewExerciseMetadata(path)
2125
if err != nil {
2226
return err
2327
}

0 commit comments

Comments
 (0)