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

Throw well formatted error if file passed via argument cannot be found (closes #4047) #4050

Closed
wants to merge 4 commits into from

Conversation

Agreon
Copy link

@Agreon Agreon commented Oct 6, 2019

Description of the Change

I added a simple loop that checks if files that are given through the --file argument are existing. If not an error message is display and the program exited to prevent them from being required later on.

Alternate Designs

I thought about placing it in run.js but the existings checks were all done somewhere more deep. collect-files() is used for the single- and watch-run. So we got the changes at one point.

Why should this be in core?

It's a functionality already implemented similar in the core.

Benefits

Users get a better error message if they did something wrong.

Possible Drawbacks

None

Applicable issues

None

@jsf-clabot
Copy link

jsf-clabot commented Oct 6, 2019

CLA assistant check
All committers have signed the CLA.

@outsideris
Copy link
Member

ref: #4047

@outsideris outsideris added type: bug a defect, confirmed by a maintainer semver-patch implementation requires increase of "patch" version number; "bug fixes" area: usability concerning user experience or interface labels Oct 13, 2019
@Agreon
Copy link
Author

Agreon commented Jan 14, 2020

Was this forgotten?

Copy link
Member

@juergba juergba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Agreon thank you

Your PR has two main issues:

  • you check not only files set by the --file option, but all test files for existence.
  • collect-files.js is not the correct place for this check, in watch mode it would be called for each re-run.

I see that you have already deleted this PR's branch, I'm sorry. I will close this PR.

@juergba juergba closed this Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: usability concerning user experience or interface semver-patch implementation requires increase of "patch" version number; "bug fixes" type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants