Skip to content

Commit

Permalink
Merge pull request #619 from exercism/improve-configure-output
Browse files Browse the repository at this point in the history
Make the successfully configured message friendlier
  • Loading branch information
Katrina Owen authored Jul 13, 2018
2 parents 7e40350 + 413f3de commit 20ec7cc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func runConfigure(configuration config.Configuration, flags *pflag.FlagSet) erro
if err := configuration.Save("user"); err != nil {
return err
}
fmt.Fprintln(Err, "\nYou have configured the Exercism command-line client:")
printCurrentConfig(configuration)
return nil
}
Expand All @@ -208,10 +209,10 @@ func printCurrentConfig(configuration config.Configuration) {
v := configuration.UserViperConfig

fmt.Fprintln(w, "")
fmt.Fprintln(w, fmt.Sprintf("Config dir:\t%s", configuration.Dir))
fmt.Fprintln(w, fmt.Sprintf("-t, --token\t%s", v.GetString("token")))
fmt.Fprintln(w, fmt.Sprintf("-w, --workspace\t%s", v.GetString("workspace")))
fmt.Fprintln(w, fmt.Sprintf("-a, --api\t%s", v.GetString("apibaseurl")))
fmt.Fprintln(w, fmt.Sprintf("Config dir:\t\t%s", configuration.Dir))
fmt.Fprintln(w, fmt.Sprintf("Token:\t(-t, --token)\t%s", v.GetString("token")))
fmt.Fprintln(w, fmt.Sprintf("Workspace:\t(-w, --workspace)\t%s", v.GetString("workspace")))
fmt.Fprintln(w, fmt.Sprintf("API Base URL:\t(-a, --api)\t%s", v.GetString("apibaseurl")))
fmt.Fprintln(w, "")
}

Expand Down

0 comments on commit 20ec7cc

Please sign in to comment.