fix-path
v4.0.0 fix path macos env environment variable shell sh zsh and 2 more...
fix-path
Fix the
$PATH
on macOS and Linux when run from a GUI app
Useful for Electron apps as GUI apps on macOS and Linux do not inherit the $PATH
defined in your dotfiles (.bashrc/.bash_profile/.zshrc/etc).
Install
$ npm install fix-path
Usage
import fixPath from 'fix-path';
console.log(process.env.PATH);
//=> '/usr/bin'
fixPath();
console.log(process.env.PATH);
//=> '/usr/local/bin:/usr/bin'
Related
- shell-path - Get the
$PATH
from the shell
npm i fix-path
Metadata
- MIT
- ^12.20.0 || ^14.13.1 || >=16.0.0
- Sindre Sorhus
- released 8/25/2021