Skip to content

Commit 413f3de

Browse files
author
Katrina Owen
committed
Make the successfully configured message friendlier
The configure output looked like it could be an error message. This adds a bit of context to say that the configuration was saved, and clarifies the output to make it easier to understand that it's showing you what the configuration settings that were saved are.
1 parent 7e40350 commit 413f3de

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

cmd/configure.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ func runConfigure(configuration config.Configuration, flags *pflag.FlagSet) erro
197197
if err := configuration.Save("user"); err != nil {
198198
return err
199199
}
200+
fmt.Fprintln(Err, "\nYou have configured the Exercism command-line client:")
200201
printCurrentConfig(configuration)
201202
return nil
202203
}
@@ -208,10 +209,10 @@ func printCurrentConfig(configuration config.Configuration) {
208209
v := configuration.UserViperConfig
209210

210211
fmt.Fprintln(w, "")
211-
fmt.Fprintln(w, fmt.Sprintf("Config dir:\t%s", configuration.Dir))
212-
fmt.Fprintln(w, fmt.Sprintf("-t, --token\t%s", v.GetString("token")))
213-
fmt.Fprintln(w, fmt.Sprintf("-w, --workspace\t%s", v.GetString("workspace")))
214-
fmt.Fprintln(w, fmt.Sprintf("-a, --api\t%s", v.GetString("apibaseurl")))
212+
fmt.Fprintln(w, fmt.Sprintf("Config dir:\t\t%s", configuration.Dir))
213+
fmt.Fprintln(w, fmt.Sprintf("Token:\t(-t, --token)\t%s", v.GetString("token")))
214+
fmt.Fprintln(w, fmt.Sprintf("Workspace:\t(-w, --workspace)\t%s", v.GetString("workspace")))
215+
fmt.Fprintln(w, fmt.Sprintf("API Base URL:\t(-a, --api)\t%s", v.GetString("apibaseurl")))
215216
fmt.Fprintln(w, "")
216217
}
217218

0 commit comments

Comments
 (0)