The module is failing to determine 'cd' (without parameters) as a command in windows.
var commandExistsSync = require('command-exists').sync;
var cmd = 'cd';
console.log("Check for cd : "+ commandExistsSync(cmd));
Output in Windows (Node v6.17.1) :
Check for cd: false
But, cd is indeed a valid command which when used without any parameters displays the current drive and directory. Whereas, other standalone commands such as dir, pwd, ls.. tends to be recognized as valid commands.
Tested and observed this behavior on recent version of node (v14.15.0) and older versions as well ( v6.17.1 , v8.17.0 and v12.13.0).
The module is failing to determine 'cd' (without parameters) as a command in windows.
Output in Windows (Node v6.17.1) :
But, cd is indeed a valid command which when used without any parameters displays the current drive and directory. Whereas, other standalone commands such as
dir, pwd, ls.. tends to be recognized as valid commands.Tested and observed this behavior on recent version of node (v14.15.0) and older versions as well ( v6.17.1 , v8.17.0 and v12.13.0).