Fixes the $PATH environment variable for GUI apps on macOS and Linux, ensuring they inherit shell-defined paths.
fix-path is a Node.js module that corrects the `$PATH` environment variable for GUI applications on macOS and Linux. It solves the problem where GUI apps, such as those built with Electron, do not inherit the shell-defined `$PATH` from files like `.bashrc` or `.zshrc`, preventing them from finding installed binaries and executables.
Developers building GUI applications with Node.js or Electron on macOS and Linux, especially those whose apps need to spawn child processes or execute shell commands that rely on a correctly set `$PATH`.
It provides a simple, reliable solution to a platform-specific issue that can break functionality in GUI apps, ensuring compatibility with user shell configurations without requiring manual workarounds or complex environment management.
Fix the $PATH on macOS and Linux when run from a GUI app
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Specifically targets PATH inheritance issues on both macOS and Linux, addressing a common pitfall for GUI apps on these platforms, as stated in the README's focus.
Requires just a single function call to update `process.env.PATH`, demonstrated in the usage example with `fixPath()`, making it easy to drop into existing code.
Built with Electron apps in mind, solving a frequent issue where they fail to inherit shell paths due to how they are launched, as highlighted in the description.
Follows a single-purpose philosophy without unnecessary dependencies, keeping the module lightweight and focused, as noted in the project's philosophy.
Known issue where packaged Electron apps launched from Finder may not quit properly due to child process cleanup problems, as admitted in the README's known issues section.
Only fixes the PATH variable and ignores other environment variables that might also be misconfigured in GUI contexts, which could be insufficient for complex apps.
Exclusively for macOS and Linux, so it's not a solution for cross-platform applications that include Windows deployments, limiting its universality.