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

Helpful message when path not found #760

Merged
merged 4 commits into from Sep 26, 2017

Conversation

@jtlapp
Copy link
Contributor

jtlapp commented Sep 25, 2017

This is a PR for issue #759. Also appended LFs to error messages that cli.js outputs to options.output so that the shell prompt lands on the following line.

@jtlapp

This comment has been minimized.

Copy link
Contributor Author

jtlapp commented Sep 25, 2017

A decision still needs to be made about the appropriate exit code. If it should be zero, then the reporter test case cited in #759 will fail (and apparently for the wrong reasons).

@jtlapp

This comment has been minimized.

Copy link
Contributor Author

jtlapp commented Sep 25, 2017

An alternative solution would pull the missing file name out of the error message, so that lab would properly report files in subdirectories that get deleted in the middle of a test run (under very specific circumstances). I was less comfortable with creating a dependency on the form of the error message. The only other option adds complexity to the traverse() function.

The present implementation seemed like a reasonable compromise of probability and simplicity.

@jtlapp

This comment has been minimized.

Copy link
Contributor Author

jtlapp commented Sep 25, 2017

Hold on. I thought of a simple fix that shows even files deleted mid-test. Mod coming...

@jtlapp

This comment has been minimized.

Copy link
Contributor Author

jtlapp commented Sep 25, 2017

That should do it.

@geek geek self-requested a review Sep 26, 2017
@geek geek self-assigned this Sep 26, 2017
@geek geek added the bug label Sep 26, 2017
@geek geek added this to the 14.3.2 milestone Sep 26, 2017
@geek

This comment has been minimized.

Copy link
Member

geek commented Sep 26, 2017

@jtlapp thanks, this will be included in the next release.

@geek geek merged commit 97cea60 into hapijs:master Sep 26, 2017
2 checks passed
2 checks passed
Node Security No known vulnerabilities found
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.