UNPKG

fix-path

Version:

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

16 lines (13 loc) 316 B
import process from 'node:process'; import {shellPathSync} from 'shell-path'; export default function fixPath() { if (process.platform === 'win32') { return; } process.env.PATH = shellPathSync() || [ './node_modules/.bin', '/.nodebrew/current/bin', '/usr/local/bin', process.env.PATH, ].join(':'); }