Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change open cmd to default to current directory #1070

Merged
merged 3 commits into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cmd/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ var openCmd = &cobra.Command{

Pass the path to the directory that contains the solution you want to see on the website.
`,
Args: cobra.ExactArgs(1),
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
metadata, err := workspace.NewExerciseMetadata(args[0])
path := "."
if len(args) == 1 {
path = args[0]
}
metadata, err := workspace.NewExerciseMetadata(path)
if err != nil {
return err
}
Expand Down
Loading