Add a command to negate the exit code of some other command
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- cli
Research direction
Start with the existing exec command and the command-dispatch entry point, then trace how exit codes are handled on each supported platform. Use the proposed shx not grep -rq DO_NOT_COMMIT_THIS . example to define the expected behavior: the new command should execute its argument and negate the resulting exit code consistently on Windows and POSIX systems.
Written by the indexing model from the issue text.
Description
I couldn't find any way to do this in a cross-platform way. POSIX shell has the ! operator that can do that, but I couldn't find a way to do it on Windows. It could work like an exec command that negates the exit code of the execution.
Sample use case: Stop a commit using husky if any file contains string DO_NOT_COMMIT_THIS. "pre-commit": "shx not grep -rq DO_NOT_COMMIT_THIS ."
- Dominant language
- JavaScript
- Stars
- 1.9k
- Forks
- 52
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from shelljs/shx
-
fix Windows
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Windows
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
dependencies
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
low priority sed
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·