fix: pass whitelist env vars to bun install (#7047)

This commit is contained in:
Alexander Petric
2025-11-04 15:30:10 +00:00
committed by GitHub
parent b08ff2e135
commit dc3bde3d34
2 changed files with 7 additions and 0 deletions
@@ -313,6 +313,7 @@ pub async fn install_bun_lockfile(
.env_clear()
.envs(PROXY_ENVS.clone())
.envs(common_bun_proc_envs)
.envs(&*crate::worker::WHITELIST_ENVS)
.args(args)
.stdout(Stdio::piped())
.stderr(Stdio::piped());
+6
View File
@@ -327,6 +327,12 @@ lazy_static::lazy_static! {
}
proxy_env
};
pub static ref WHITELIST_ENVS: HashMap<String, String> = {
windmill_common::worker::load_env_vars(
windmill_common::worker::load_whitelist_env_vars_from_env(),
&HashMap::new(),
)
};
pub static ref DENO_PATH: String = std::env::var("DENO_PATH").unwrap_or_else(|_| "/usr/bin/deno".to_string());
pub static ref BUN_PATH: String = std::env::var("BUN_PATH").unwrap_or_else(|_| "/usr/bin/bun".to_string());
pub static ref NPM_PATH: String = std::env::var("NPM_PATH").unwrap_or_else(|_| "/usr/bin/npm".to_string());