fix-path
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 4.0.0
    2,088
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 4.0.0
    2,088
  • 3.0.0
    4,040
  • 2.1.0
    285
  • 2.0.0
    3
  • 1.1.0
    19
  • 1.0.0
    0

Package Sidebar

Install

npm i fix-path

Weekly Downloads

6,435

Version

4.0.0

License

MIT

Unpacked Size

3.06 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus
  • silverwind