Skip to content

Commit

Permalink
open: original functionality works
Browse files Browse the repository at this point in the history
  • Loading branch information
Smarticles101 committed Feb 28, 2019
1 parent 1037504 commit 0ef90c5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ func runOpen(cfg config.Config, flags *pflag.FlagSet, args []string) error {
teamID, _ := flags.GetString("team")

if exerciseID == "" {
return fmt.Errorf("Must provide an `--exercise`")
// if no --exercise is given, use original functionality
metadata, err := workspace.NewExerciseMetadata(args[0])
if err != nil {
return err
}
browser.Open(metadata.URL)
return nil
//return fmt.Errorf("Must provide an `--exercise`")
}

if remote, _ := flags.GetBool("remote"); remote {
Expand Down

0 comments on commit 0ef90c5

Please sign in to comment.