fix-path
Fix the $PATH on macOS when run from a GUI app
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install fix-path 
SYNC missed versions from official npm registry.

fix-path Build Status

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

Current Tags

  • 3.0.0                                ...           latest (a year ago)

5 Versions

  • 3.0.0                                ...           a year ago
  • 2.1.0                                ...           4 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago

Copyright 2014 - 2017 © taobao.org |