JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 182
  • Score
    100M100P100Q89887F
  • License ISC

Find the first instance of an executable in the PATH, with expanding all symbolic links

Package Exports

  • real-executable-path

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (real-executable-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

real-executable-path

npm version Build Status Build status Coverage Status

Find the first instance of an executable in the PATH, with expanding all symbolic links

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'
});

Installation

Use npm.

npm install real-executable-path

API

const realExecutablePath = require('real-executable-path');

realExecutablePath(binName [, options])

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.

License

ISC License © 2017 - 2018 Shinnosuke Watanabe