Find the first instance of an executable in the PATH, with expanding all symbolic links
npm install real-executable-path



Find the first instance of an executable in the PATH, with expanding all symbolic links
``javascript
const realExecutablePath = require('real-executable-path');
const which = require('which');
which('npm', (err, binPath) => {
binPath; //=> '/usr/local/bin/npm'
});
realExecutablePath('npm').then(binPath => {
binPath; //=> '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
});
`
``
npm install real-executable-path
`javascript`
const realExecutablePath = require('real-executable-path');
binName: string (an executable name in the PATH) Object
options: (node-which options except for all) Promise
Return:
It finds the first instance of the given executable in the PATH environment variable, expands all symbolic links and resolves the canonicalized absolute pathname.
* real-executable-paths – Returns all matched paths, instead of just the first one
* real-which – CLI
ISC License © 2017 - 2018 Shinnosuke Watanabe