-
Notifications
You must be signed in to change notification settings - Fork 145
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
init created empty .all-contributorsrc #359
Comments
BTW when running eg. |
Thanks; I was seeing this too. Temporary fix: "all-contributors-cli": "6.25.1" |
For me it works the first time you run the command. Afterwards if trying to add another contributor it stops working due to the empty rc file. |
🎉 This issue has been resolved in version 6.26.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug
When I use
yarn all-contributors init
a.all-contributorsrc
is created but it contains just anundefined
in line 1.When trying to add a contributor the json-fixer fails, since json cannot contain just an undefined.
When manually creating a
.all-contributorsrc
and usingall-contributors add
the command deletes everything in the.all-contributorsrc
and adds an undefined.To Reproduce
Steps to reproduce the behavior:
Expected behavior
init command should create correct .all-contributorsrc
Additional context
node -v v20.3.1
node -v v16.20.1 (both tested)
yarn -v 3.6.1
yarn -v 1.22.19 (both tested)
all-contributors -v 6.26.0
Solution
Error seems to occur from:
cli/src/util/config-file.js
Line 47 in e0a5312
formatConfig() requires 2 arguments. The first is configPath, second is content. Here the content is passed as the configPath.
Changing this to:
resolves the issue.
Same thing applied to this:
cli/src/util/config-file.js
Line 18 in e0a5312
The text was updated successfully, but these errors were encountered: