Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 21e3026

Browse files
committed
feat(nitro-node): allow programmatically specifying the nitro version tag in code
1 parent 142a60d commit 21e3026

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nitro-node/src/scripts/download-nitro.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,16 @@ if (!(PLATFORM in variantMapping)) {
198198
// Get download config for this platform
199199
const variantConfig: Record<string, string> = variantMapping[PLATFORM];
200200
// Call the download function with version and config
201-
export const downloadNitro = async (absBinDirPath: string) => {
201+
export const downloadNitro = async (
202+
absBinDirPath: string,
203+
version?: string,
204+
) => {
202205
// Return early without downloading if nitro binaries are already downloaded
203206
if (verifyDownloadedBinaries(absBinDirPath)) {
204207
//console.log("Nitro binaries are already downloaded!");
205208
return;
206209
}
207-
const releaseInfo = await getReleaseInfo(NITRO_VERSION);
210+
const releaseInfo = await getReleaseInfo(version ?? NITRO_VERSION);
208211
const downloadInfo = await extractDownloadInfo(releaseInfo, variantConfig);
209212
return await downloadBinaries(downloadInfo, absBinDirPath);
210213
};

0 commit comments

Comments
 (0)