1.2.0 • Published 2 years ago

node-fix-path v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

node-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).

Fully self contained and bundled.

Install

npm install node-fix-path

or

yarn add node-fix-path

Usage

import { fixPath } from "node-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
  • fix-path - Same package but only with esm support
1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago