Skip to content
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

Conversation

jdsutherland
Copy link
Contributor

Closes #773

@jdsutherland jdsutherland force-pushed the ensure-exercise-dirname-matches-metadata-slug branch from 64654f9 to 7c16f08 Compare December 8, 2018 10:54
@jdsutherland jdsutherland force-pushed the ensure-exercise-dirname-matches-metadata-slug branch from 7c16f08 to 91fad9a Compare December 8, 2018 10:55
@jdsutherland jdsutherland force-pushed the ensure-exercise-dirname-matches-metadata-slug branch from 1edcfe0 to 5ae41df Compare December 9, 2018 02:40
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")
Copy link
Contributor

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.

@jdsutherland jdsutherland force-pushed the ensure-exercise-dirname-matches-metadata-slug branch from 72c54cc to fb46844 Compare December 9, 2018 05:38
@jdsutherland jdsutherland force-pushed the ensure-exercise-dirname-matches-metadata-slug branch from fb46844 to 485caf7 Compare December 9, 2018 05:40
@nywilken
Copy link
Contributor

@jdsutherland thanks for making the updates. @Smarticles101 thanks for reviewing as well.

@nywilken nywilken merged commit 0500cf5 into exercism:master Dec 12, 2018
jdsutherland added a commit to jdsutherland/cli that referenced this pull request Dec 12, 2018
* Exercise dirname matches metadata exercise slug

* Avoid panic when err nil on test failure

* Make error message actionable
Smarticles101 pushed a commit to Smarticles101/cli that referenced this pull request Feb 28, 2019
* Exercise dirname matches metadata exercise slug

* Avoid panic when err nil on test failure

* Make error message actionable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants