renative
renative copied to clipboard
[REGRESSION] commandExistsSync incorrectly returns false in some cases
Describe the bug
commandExistsSync("somecmd") returns false if somecmd doesn't support the --version option or exits with a non-zero exit code.
To Reproduce
Call commandExistsSync("unzip").
Expected behavior
It should return true, but returns false instead.
Desktop
- OS: macOS
- Node Version v18.19.0
- RNV Version 1.0.0-rc.21
Additional context
Not all commands support --version, so commandExistsSync should not rely on it.
Regressed here.