-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix ENOENT error message in CLI #3165
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Looks like some tests are failing. Can you also add a test for this so there is no regression in the future?
@UziTech I've fixed the failing tests and attempted to write a test to prevent regressions, but it looked like this part of the code is currently not well tested. I seem to be running into this error whenever I attempt to pass a file as an input to the tests, that I'd appreciate some help debugging: |
looks like the error was in the bin test framework |
Co-authored-by: Steven <steven@ceriously.com>
Marked version: 11.1.1
Markdown flavor: n/a
Description
This PR fixes a slight bug in the
marked
CLI in which the error message due to aENOENT
was bugging out the error output.I also updated the language in the
ENOENT
error to better reflect the fact that theENOENT
may have been due to any of the inputted files.Expectation
When running the
marked
CLI with an input file that does not exist, I expect it to print out an error containing only the relevant information.Result
Marked was attempting to print out both error paths, and attempting to print an error object to
stderr
What was attempted
The stacktrace above was remediated.
Contributor
Committer
In most cases, this should be a different person than the contributor.