Package Exports
- shell-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 (shell-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
shell-path 
Get the
$PATH
from the shell
Useful for Electron/NW.js apps as GUI apps on OS X doesn't inherit the $PATH
defined in your dotfiles (.bashrc/.bash_profile/.zshrc/etc).
Install
$ npm install --save shell-path
Usage
When executed from a GUI app on OS X:
var shellPath = require('shell-path');
console.log(process.env.PATH);
//=> '/usr/bin'
console.log(shellPath.sync());
//=> '/usr/local/bin:/usr/bin:...'
API
shellPath(callback(error, path))
shellPath.sync()
Synchronous version. Returns the $PATH
.
Related
- fix-path - Fix the $PATH on OS X when run from a GUI app
License
MIT © Sindre Sorhus