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
feat: display a meaningful error when the config file is missing #288
feat: display a meaningful error when the config file is missing #288
Conversation
## What When you try to add a user with `.all-contributorsrc` missing, you will get a cryptic error message (see also all-contributors/all-contributors#378): ``` $ all-contributors add darekkay maintenance Cannot read property 'then' of null ``` This PR displays a meaningful error message in this case. ## Why So users know what's causing the problem. ## How Before a contribution is being added, the script checks whether the config file exists. If it doesn't, an error message is being displayed: ``` $ all-contributors add darekkay maintenance Configuration file not found: C:\projects\test\.all-contributorsrc ```
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.
Would it be possible to add/update tests?
The ESlint warning is not caused by this PR. I've fixed it in a separate PR: #289
There are no tests for the whole |
That's a good point CLI E2E tests can be very tricky to do. |
1 similar comment
That's a good point CLI E2E tests can be very tricky to do. |
🎉 This PR is included in version 6.18.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* origin/master: (85 commits) refactor: log full error stack on error (#316) chore: fix status badges (#315) docs: add JoshuaKGoldberg as a contributor for bug (#314) fix: incorrect usage of `tbody` (#311) fix: trim `nextLink` before slicing (#309) fix: set default value as `7` for `contributorsPerLine` (#139) chore(deps): bump dependencies and devDeps (#298) refactor: add tbody to contributors table (#307) docs: add Lucas-C as a contributor for doc (#306) fix: scriptName + improving usage messages (#305) docs: add vapurrmaid as a contributor (#304) chore(deps): CVE-2021-23337 in inquirer->lodash (#303) docs: add SirWindfield as a contributor (#297) feat: add namespaced token (#296) docs: add LaChapeliere as a contributor (#292) feat(contribution-types): add research contribution type (#291) docs: add darekkay as a contributor (#290) feat: display a meaningful error when the config file is missing (#288) docs: add melink14 as a contributor (#285) docs: add jdalrymple as a contributor (#264) ...
What
When you try to add a user with
.all-contributorsrc
missing, you will get a cryptic error message (see also all-contributors/all-contributors#378):This PR displays a meaningful error message in this case.
Why
So users know what's causing the problem.
How
Before a contribution is being added, the script checks whether the config file exists. If it doesn't, an error message is being displayed:
Checklist: