GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: Remove Pify dependency by jdalrymple · Pull Request #465 · all-contributors/cli

Conversation

@jdalrymple

@jdalrymple jdalrymple commented Mar 1, 2026 •
edited by lwasser
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

What: Removing pify dependency

Additionally:

  • Fixed up the prompt UX mentioned here QUIRK IN THE cli #464
  • Cleaned up some of the tests
  • Linting

Why: Native node supports promisified functions

How: Convert from one to the other

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jdalrymple added 7 commits March 1, 2026 16:15
@jdalrymple
First pass
77ba1a8
@jdalrymple
Fixing more imports
d225f80
@jdalrymple
Improve UX when using add command
09bdfb1
@jdalrymple
Clean up tests
f9fc638
@jdalrymple
Linting
3300f3e
@jdalrymple
Updating tests
275dd6b
@jdalrymple
Linting
d37817b
jdalrymple
jdalrymple commented Mar 1, 2026
View reviewed changes
Comment thread src/cli.js
],
choices: choices,
when: !argv._[0],
default: 0,

@jdalrymple jdalrymple Mar 1, 2026

Copy link
Copy Markdown
Contributor Author

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.

If you dont specify the default value, the hint shows (0) and not (add)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lwasser reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
jdalrymple
jdalrymple commented Mar 1, 2026
View reviewed changes
Comment thread .all-contributorsrc Outdated
"commit": false,
"contributorsPerLine": 6,
"linkToUsage": true,
"files": [

@jdalrymple jdalrymple Mar 1, 2026

Copy link
Copy Markdown
Contributor Author

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.

Just linting in this whole file

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jdalrymple
jdalrymple commented Mar 1, 2026
View reviewed changes
Comment thread src/util/__tests__/git.js
@@ -0,0 +1,159 @@
import {test, expect, vi, describe, beforeEach} from 'vitest'

@jdalrymple jdalrymple Mar 1, 2026

Copy link
Copy Markdown
Contributor Author

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.

Added tests for this functionality to ensure nothing broke / doesnt break going forward

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lwasser reacted with hooray emoji
All reactions
  • 🎉 1 reaction
jdalrymple
jdalrymple commented Mar 1, 2026
View reviewed changes
Comment thread src/init/__tests__/init-content.js
@@ -0,0 +1,66 @@
import {test, expect, describe} from 'vitest'

@jdalrymple jdalrymple Mar 1, 2026

Copy link
Copy Markdown
Contributor Author

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.

Just moved the tests from the separate files. Now the test file matches the src file naming convention

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lwasser reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
jdalrymple
jdalrymple commented Mar 1, 2026
View reviewed changes
Comment thread src/contributors/prompt.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jdalrymple
jdalrymple requested a review from lwasser March 1, 2026 22:20
@jdalrymple
jdalrymple marked this pull request as ready for review March 1, 2026 22:20
@jdalrymple
Merge branch 'main' into chore/remove-pify
3dfe7c9
@jdalrymple

jdalrymple commented Mar 2, 2026

Copy link
Copy Markdown
Contributor Author

@lwasser Let me know if there are any additional things you want to validate before merging this badboy

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lwasser
lwasser approved these changes Mar 3, 2026
View reviewed changes

@lwasser lwasser left a comment

Copy link
Copy Markdown
Member

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.

Thank you @jdalrymple for this!! there is some great cleanup here and reorg + new tests are also welcome!! let's merge this. My apologies, i started testing this the other day and then forgot to complete my review.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jdalrymple reacted with laugh emoji
All reactions
  • 😄 1 reaction
@lwasser
lwasser merged commit ed5b6a6 into all-contributors:main Mar 3, 2026
5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Mar 3, 2026
QUIRK IN THE cli #464
Closed
Remove pify dependency #452
Closed
@jdalrymple
jdalrymple deleted the chore/remove-pify branch March 3, 2026 07:15
This was referenced Mar 6, 2026
chore(main): release all-contributors-cli 7.0.0 #476
Closed
chore(main): release 6.27.0 #483
Closed
This was referenced Oct 23, 2026
chore(main): release 6.27.0 #581
Closed
chore(release): release 7.0.0 #583
Merged
@stchigel stchigel mentioned this pull request Oct 30, 2026
fix: run git commands without a shell #588
Merged
2 of 4 tasks
stchigel pushed a commit to stchigel/cli that referenced this pull request Nov 9, 2026
@geniosoy @claude
fix(git): run git commands without a shell
7c8014d
Since all-contributors#465, spawnGitCommand has joined its arguments into one string and
run it through a shell. The commit message was split on spaces, so
`all-contributors add` failed with `pathspec` errors when `commit` was
enabled. Paths containing spaces broke `git add` the same way, and shell
metacharacters in a username or commit template were executed.

Pass the arguments to execFile so each one reaches git intact.

Fixes all-contributors#587

Co-Authored-By: Claude Opus 5.5 <[email protected]>
stchigel pushed a commit to stchigel/cli that referenced this pull request Nov 11, 2026
@geniosoy @claude
fix(git): run git commands without a shell
a8c43d8
Since all-contributors#465, spawnGitCommand has joined its arguments into one string and
run it through a shell. The commit message was split on spaces, so
`all-contributors add` failed with `pathspec` errors when `commit` was
enabled. Paths containing spaces broke `git add` the same way, and shell
metacharacters in a username or commit template were executed.

Pass the arguments to execFile so each one reaches git intact.

Fixes all-contributors#587

Co-Authored-By: Claude Opus 5.5 <[email protected]>
michaelfaith pushed a commit to stchigel/cli that referenced this pull request Nov 11, 2026
@geniosoy @claude @michaelfaith
fix(git): run git commands without a shell
32a4c9a
Since all-contributors#465, spawnGitCommand has joined its arguments into one string and
run it through a shell. The commit message was split on spaces, so
`all-contributors add` failed with `pathspec` errors when `commit` was
enabled. Paths containing spaces broke `git add` the same way, and shell
metacharacters in a username or commit template were executed.

Pass the arguments to execFile so each one reaches git intact.

Fixes all-contributors#587

Co-Authored-By: Claude Opus 5.5 <[email protected]>
michaelfaith pushed a commit that referenced this pull request Nov 12, 2026
@stchigel @geniosoy @claude
fix: run git commands without a shell (#588)
f9d3ee2
<!--
Thanks for your interest in the project. Bugs filed and PRs submitted
are appreciated!

Please make sure that you are familiar with and follow the Code of
Conduct for
this project (found in the CODE_OF_CONDUCT.md file).

Also, please make sure you're familiar with and follow the instructions
in the
contributing guidelines (found in the CONTRIBUTING.md file).

If you're new to contributing to open source projects, you might find
this free
video course helpful: http://kcd.im/pull-request

Please fill out the information below to expedite the review and
(hopefully)
merge of your pull request!
-->

<!-- What changes are being made? (What feature/bug is being fixed
here?) -->

**What**: Fixes #587: With `"commit": true`, `all-contributors add`
fails at the commit step with `pathspec` errors, leaving the files
staged but not committed.

<!-- Why are these changes necessary? -->

**Why**: This is a regression from #465. `spawnGitCommand` joins its
arguments into one string and runs it through a shell, which causes
three problems:
- The commit message is split on spaces, so only the first word is used
as the message and the rest are treated as pathspecs.
- `git add` fails when the project path contains a space.
- Shell metacharacters in a username or commit template are executed.
Usernames aren't escaped because `autoEscape` is off (in
src/util/template.js). (Confirmed this on Windows with `&`, did not test
it on a POSIX shell)

<!-- How were these changes implemented? -->

**How**: 
- `spawnGitCommand` now uses `execFile('git', args)`, so each argument
reaches git intact with no shell involved.
- `getRemoteOriginData` still uses `exec`, since its command is just a
fixed string.
- The existing tests asserted the broken joined string, so they now
expect an argument array.
- Added regression tests to test/e2e/cli.test.js. They run add octocat
doc --commit in a temporary git repo whose path contains a space, and
check that the commit gets the whole message and that shell
metacharacters in the message are not executed. Both tests fail without
the fix.

I also ran the reproduction steps from the issue using the fixed CLI,
and confirmed the fix works.

<!-- Have you done all of these things?  -->

**Checklist**:

<!-- add "N/A" to the end of each line that's irrelevant to your changes
-->
<!-- to check an item, place an "x" in the box like so: "- [x]
Documentation" -->

- [ ] Documentation N/A
- [x] Tests
- [x] Ready to be merged
<!-- In your opinion, is this ready to be merged as soon as it's
reviewed? -->
- [ ] Added myself to contributors table
<!-- this is optional, see the contributing guidelines for instructions
-->

<!-- feel free to add additional comments -->

---------

Co-authored-by: geniosoy <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lwasser lwasser lwasser approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jdalrymple @lwasser
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.