fix: add support for NPM_CONFIG_REGISTRY

This commit is contained in:
Ruben Fiszel
2024-01-29 20:56:48 +01:00
parent c60a7e77e2
commit 5686ce0321
2 changed files with 14 additions and 0 deletions
@@ -242,6 +242,13 @@ pub async fn install_lockfile(
.args(vec!["install"])
.stdout(Stdio::piped())
.stderr(Stdio::piped());
if npm_mode {
let registry = NPM_CONFIG_REGISTRY.read().await.clone();
if let Some(registry) = registry {
child_cmd.env("NPM_CONFIG_REGISTRY", registry);
}
}
let child_process = start_child_process(child_cmd, &*BUN_PATH).await?;
gen_bunfig(job_dir).await?;
+7
View File
@@ -80,6 +80,13 @@ export async function generateMetadataInternal(
scriptPath,
globalDeps
);
if (rawReqs) {
log.info(
colors.blue(
`Found raw requirements (package.json/requirements.txt) for ${scriptPath}, using it`
)
);
}
const metadataWithType = await parseMetadataFile(
remotePath,
undefined,