mathisonian / mathisonian/command-exists
False negative for nvm
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 147
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
I'm consuming command-exists as follows (only relevant code included):
```typescript
import commandExists from 'command-exists';
import { promisify } from 'util';
const doesCommandExist = promisify(commandExists);
const configure = async () => {
const isNVMInstalled = await doesCommandExist('nvm');
const isDockerInstalled = await doesCommandExist('docker');
console.log({ isNVMInstalled, isDockerInstalled });
};
configure();
```
Both are installed and usable from the command line. The output I get is:
```shell
{ isNVMInstalled: false, isDockerInstalled: true }
```
I'm on
MacOS Catalina 10.15.6 (19G73)
Node v12.16.3
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
The payload names no source file or test. Start at the command-exists('nvm') entry point and reproduce the discrepancy on the stated macOS and Node versions, then compare it with the successful docker lookup. Done means nvm is detected when installed and a regression test covers the false negative.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100