A Rust crate to fix the PATH
environment variable on macOS and Linux when running a GUI app.
GUI apps on macOS and Linux do not inherit the $PATH
from your shell dotfiles (.bashrc, .bash_profile, .zshrc, etc).
There are three general methods of installation that we can recommend.
- Pull sources directly from Github using git tags / revision hashes (most secure, good for developement, shown below)
- Git submodule install this repo in your tauri project and then use
file
protocol to ingest the source - Use crates.io and npm (easiest, and requires you to trust that our publishing pipeline worked)
Please note, below in the dependencies you can also lock to a revision/tag in the Cargo.toml
.
src-tauri/Cargo.toml
[dependencies.tauri]
git = "https://github.com/tauri-apps/tauri/"
branch = "dev"
features = ["api-all"]
[dependencies.fix-path-env]
git = "https://github.com/tauri-apps/fix-path-env-rs"
tag = "fix-path-env-v0.1.0"
#branch = "dev"
Use in src-tauri/src/main.rs
:
fn main() {
fix_path_env::fix();
tauri::Builder::default()
.run(tauri::generate_context!());
}
MIT / Apache-2.0