All Projects → sindresorhus → Fix Path

sindresorhus / Fix Path

Licence: mit
Fix the $PATH on macOS when run from a GUI app

Programming Languages

javascript
184084 projects - #8 most used programming language

fix-path

Fix the $PATH on macOS when run from a GUI app

Useful for Electron apps as GUI apps on macOS doesn't inherit the $PATH defined in your dotfiles (.bashrc/.bash_profile/.zshrc/etc).

Install

$ npm install fix-path

Usage

const fixPath = require('fix-path');

console.log(process.env.PATH);
//=> '/usr/bin'

fixPath();

console.log(process.env.PATH);
//=> '/usr/local/bin:/usr/bin'

Related

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].