From 5502f3137c449672419af876f8e1cbc5a364290e Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Mon, 10 Jan 2022 15:52:51 -0800 Subject: [PATCH] Trim newlines from end of path on macOS --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 389fed2..70c297e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -209,7 +209,10 @@ fn handle_macos() { .arg(cmd) .output() { - env::set_var("PATH", std::str::from_utf8(&path.stdout).unwrap()); + env::set_var( + "PATH", + std::str::from_utf8(&path.stdout).unwrap().trim_end(), + ); } } }