command-exists
command-exists copied to clipboard
False negative for nvm
I'm consuming command-exists as follows (only relevant code included):
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:
{ isNVMInstalled: false, isDockerInstalled: true }
I'm on MacOS Catalina 10.15.6 (19G73) Node v12.16.3
is this maybe a duplicat of https://github.com/mathisonian/command-exists/issues/35 ?