-
-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exercise dirname matches metadata exercise slug #774
Exercise dirname matches metadata exercise slug #774
Conversation
64654f9
to
7c16f08
Compare
7c16f08
to
91fad9a
Compare
1edcfe0
to
5ae41df
Compare
cmd/submit.go
Outdated
@@ -141,6 +141,11 @@ func runSubmit(cfg config.Config, flags *pflag.FlagSet, args []string) error { | |||
return err | |||
} | |||
|
|||
if exercise.Slug != metadata.Exercise { | |||
// TODO: error msg should suggest running future doctor command | |||
return errors.New("exercise directory does not match exercise slug in metadata") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should indicate what was found, what was expected, and how to fix. When users open issues pertaining to path errors the messaging doesn't contain path information, which makes the troubleshooting a little harder than it needs to be.
exercise directory does not match slug: expected %s but found %s. Please rename the directory and try again.
72c54cc
to
fb46844
Compare
fb46844
to
485caf7
Compare
@jdsutherland thanks for making the updates. @Smarticles101 thanks for reviewing as well. |
* Exercise dirname matches metadata exercise slug * Avoid panic when err nil on test failure * Make error message actionable
* Exercise dirname matches metadata exercise slug * Avoid panic when err nil on test failure * Make error message actionable
Closes #773