command-exists icon indicating copy to clipboard operation
command-exists copied to clipboard

False negative for nvm

Open jameslafferty opened this issue 4 years ago • 1 comments

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

jameslafferty avatar Jul 22 '20 19:07 jameslafferty

is this maybe a duplicat of https://github.com/mathisonian/command-exists/issues/35 ?

rbbl-dev avatar Mar 28 '22 17:03 rbbl-dev