Skip to content

Commit bb23000

Browse files
Edit some help messages
1 parent 9a2e988 commit bb23000

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

checks/checks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func CLIChecks(cliData api.CLIData, overrideBaseURL string, ch chan tea.Msg) (re
134134
results = make([]api.CLIStepResult, len(cliData.Steps))
135135

136136
if cliData.BaseURLDefault == api.BaseURLOverrideRequired && overrideBaseURL == "" {
137-
cobra.CheckErr("lesson requires a base URL override - bootdev configure base_url <url>")
137+
cobra.CheckErr("lesson requires a base URL override: `bootdev configure base_url <url>`")
138138
}
139139

140140
// prefer overrideBaseURL if provided, otherwise use BaseURLDefault

client/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func LoginWithCode(code string) (*LoginResponse, error) {
6161
}
6262

6363
if resp.StatusCode == 403 {
64-
return nil, errors.New("invalid login code, please refresh your browser then try again")
64+
return nil, errors.New("invalid login code; please refresh your browser and try again")
6565
}
6666

6767
if resp.StatusCode != 200 {

client/lessons.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func SubmitCLILesson(uuid string, results []CLIStepResult) (*VerificationResultS
175175
return nil, fmt.Errorf("To run and submit the tests for this lesson, you must have an active Boot.dev membership\nhttps://boot.dev/pricing")
176176
}
177177
if code != 200 {
178-
return nil, fmt.Errorf("failed to submit CLI lesson (code: %v): %s", code, string(resp))
178+
return nil, fmt.Errorf("failed to submit CLI lesson (code %v): %s", code, string(resp))
179179
}
180180

181181
result := verificationResult{}

cmd/configure.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var configureColorsCmd = &cobra.Command{
4444
return fmt.Errorf("failed to write config: %v", err)
4545
}
4646

47-
fmt.Println("Reset colors!")
47+
fmt.Println("Colors reset!")
4848
return err
4949
}
5050

@@ -105,7 +105,7 @@ var configureBaseURLCmd = &cobra.Command{
105105
if err != nil {
106106
return fmt.Errorf("failed to write config: %v", err)
107107
}
108-
fmt.Println("Reset base URL!")
108+
fmt.Println("Base URL reset!")
109109
return err
110110
}
111111

cmd/login.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ var loginCmd = &cobra.Command{
8080
w = 0
8181
}
8282
// Pad the logo with whitespace
83-
welcome := lipgloss.PlaceHorizontal(lipgloss.Width(logo), lipgloss.Center, "Welcome to the boot.dev CLI!")
83+
welcome := lipgloss.PlaceHorizontal(lipgloss.Width(logo), lipgloss.Center, "Welcome to the Boot.dev CLI!")
8484

8585
if w >= lipgloss.Width(welcome) {
8686
fmt.Println(logoRenderer())
8787
fmt.Print(welcome, "\n\n")
8888
} else {
89-
fmt.Print("Welcome to the boot.dev CLI!\n\n")
89+
fmt.Print("Welcome to the Boot.dev CLI!\n\n")
9090
}
9191

9292
loginUrl := viper.GetString("frontend_url") + "/cli/login"

cmd/root.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ var cfgFile string
1717

1818
var rootCmd = &cobra.Command{
1919
Use: "bootdev",
20-
Short: "The official boot.dev CLI",
21-
Long: `The official CLI for boot.dev. This program is meant
22-
to be a companion app (not a replacement) for the website.`,
20+
Short: "Official Boot.dev CLI",
21+
Long: `The official CLI for Boot.dev. This program is meant
22+
as a companion app (not a replacement) for the website.`,
2323
}
2424

2525
// Execute adds all child commands to the root command and sets flags appropriately.
@@ -34,7 +34,7 @@ func Execute(currentVersion string) error {
3434

3535
func init() {
3636
cobra.OnInitialize(initConfig)
37-
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.bootdev.yaml)")
37+
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default $HOME/.bootdev.yaml)")
3838
}
3939

4040
func readViperConfig(paths []string) error {

cmd/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
func init() {
88
rootCmd.AddCommand(runCmd)
9-
runCmd.Flags().BoolVarP(&forceSubmit, "submit", "s", false, "shortcut flag to submit instead of run")
9+
runCmd.Flags().BoolVarP(&forceSubmit, "submit", "s", false, "shortcut flag to submit after running")
1010
}
1111

1212
// runCmd represents the run command

cmd/submit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func submissionHandler(cmd *cobra.Command, args []string) error {
5555
}
5656

5757
if !isAllowedOS {
58-
return fmt.Errorf("lesson is not supported for your operating system: \"%s\". Try again with one of the following: %v", runtime.GOOS, data.AllowedOperatingSystems)
58+
return fmt.Errorf("lesson is not supported for your operating system (%s); try again with one of the following: %v", runtime.GOOS, data.AllowedOperatingSystems)
5959
}
6060

6161
overrideBaseURL := viper.GetString("override_base_url")

0 commit comments

Comments
 (0)