callumacrae / fix-path

Fix the $PATH on OS X when run from a GUI app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix-path Build Status

Fix the $PATH on OS X when run from a GUI app

Apps on OS X doesn't inherit the $PATH defined in your dotfiles (.bashrc/.bash_profile/.zshrc/etc).

Useful for Electron/NW.js apps so you can spawn binaries.

Install

$ npm install --save fix-path

Usage

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

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

fixPath();

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

License

MIT © Sindre Sorhus

About

Fix the $PATH on OS X when run from a GUI app

License:MIT License


Languages

Language:JavaScript 100.0%