From 2b288542bdfdba62b9182002db6c8c23cdd9869f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 14 Jan 2024 14:44:18 +0100 Subject: [PATCH] fix: improve bun imports resolutions --- backend/windmill-worker/src/bun_executor.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/windmill-worker/src/bun_executor.rs b/backend/windmill-worker/src/bun_executor.rs index 6c3634953d..e3d021c667 100644 --- a/backend/windmill-worker/src/bun_executor.rs +++ b/backend/windmill-worker/src/bun_executor.rs @@ -339,7 +339,8 @@ pub async fn handle_bun_job( // TODO: remove once bun implement a reasonable set of trusted deps let trusted_deps = get_trusted_deps(inner_content); let empty_trusted_deps = trusted_deps.len() == 0; - let has_custom_config_registry = common_bun_proc_envs.contains_key("NPM_CONFIG_REGISTRY"); + let has_custom_config_registry = NPM_CONFIG_REGISTRY.read().await.is_some() + || BUNFIG_INSTALL_SCOPES.read().await.is_some(); // if !*DISABLE_NSJAIL || !empty_trusted_deps || has_custom_config_registry { logs.push_str("\n\n--- BUN INSTALL ---\n"); set_logs(&logs, &job.id, &db).await;