Find the first instance of an executable in the PATH, with expanding all symbolic links
A Node.js module to find the first instance of an executable in the PATH, with expanding all symbolic links
const realExecutablePath = require('real-executable-path');
(async () => {
await realExecutablePath('npm'); //=> '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
})();
npm install real-executable-path
const realExecutablePath = require('real-executable-path');
binName: string
(an executable name in the PATH)
options: Object
(node-which
options except for all
)
Return: Promise<string>
It finds the first instance of the given executable in the PATH environment variable, expands all symbolic links and resolves the canonicalized absolute pathname.
ISC License © 2017 - 2019 Shinnosuke Watanabe