diff --git a/src/main.rs b/src/main.rs index 2de65f7..6581242 100644 --- a/src/main.rs +++ b/src/main.rs @@ -229,15 +229,11 @@ fn handle_macos() { use std::env; if env::var_os("TERM").is_none() { - let mut profile_path = dirs::home_dir().unwrap(); - profile_path.push(".profile"); let shell = env::var("SHELL").unwrap(); - let cmd = format!( - "(source /etc/profile && source {} && echo $PATH)", - profile_path.to_str().unwrap() - ); + let cmd = "printenv PATH"; + if let Ok(path) = std::process::Command::new(shell) - .arg("-c") + .arg("-lic") .arg(cmd) .output() {