Skip to content

Commit

Permalink
Add Descriptive Error Message to Upgrade Command (exercism#752)
Browse files Browse the repository at this point in the history
* Add Descriptive Error Message to Upgrade Command

* Reword Error Message
  • Loading branch information
farisj authored and nywilken committed Nov 2, 2018
1 parent ed6dc02 commit 97d69cc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,18 @@ You can always delete this file.
`,
RunE: func(cmd *cobra.Command, args []string) error {
c := cli.New(Version)
return updateCLI(c)
err := updateCLI(c)
if err != nil {
return fmt.Errorf(`
We were not able to upgrade the cli because we encountered an error:
%s
Please check the FAQ for solutions to common upgrading issues.
https://exercism.io/faqs`, err)
}
return nil
},
}

Expand Down

0 comments on commit 97d69cc

Please sign in to comment.