From cf893dc94a5202a137631e1419cb9279b5124195 Mon Sep 17 00:00:00 2001 From: Moritz Hedtke Date: Mon, 13 Oct 2025 21:43:50 +0200 Subject: [PATCH] Fix on NixOS (#4776) --- packages/cli/src/build/request.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/build/request.rs b/packages/cli/src/build/request.rs index 178dc26f4..5ff7514d8 100644 --- a/packages/cli/src/build/request.rs +++ b/packages/cli/src/build/request.rs @@ -1720,10 +1720,7 @@ impl BuildRequest { // On linux, we need to set a more complete PATH for the linker to find its libraries if cfg!(target_os = "linux") { - command_envs.push(( - "PATH".to_string(), - "/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin".to_string(), - )); + command_envs.push(("PATH".to_string(), std::env::var("PATH").unwrap())); } // Run the linker directly! @@ -2251,10 +2248,7 @@ impl BuildRequest { // On linux, we need to set a more complete PATH for the linker to find its libraries if cfg!(target_os = "linux") { - command_envs.push(( - "PATH".to_string(), - "/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin".to_string(), - )); + command_envs.push(("PATH".to_string(), std::env::var("PATH").unwrap())); } // Run the linker directly!