From c9190b48fd11046b147dca4a57663bd164301eb7 Mon Sep 17 00:00:00 2001 From: Robin Huang Date: Mon, 11 Nov 2024 21:24:13 -0800 Subject: [PATCH] revert. --- scripts/downloadUV.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/downloadUV.js b/scripts/downloadUV.js index 6bdaf1f2..42db97e3 100644 --- a/scripts/downloadUV.js +++ b/scripts/downloadUV.js @@ -25,15 +25,9 @@ const options = { } async function downloadUV() { - const baseDownloadURL = `https://github.com/astral-sh/uv/releases/download/${uvVer}/`; - const uvDownloaded = fs.existsSync(path.join('./assets', 'uv')); - if (!uvDownloaded) { - await downloadAndExtract(baseDownloadURL, options[os.platform()]); - return; - } - console.log('< UV Folder Exists, Skipping >'); const allFlag = process.argv[2]; + const baseDownloadURL = `https://github.com/astral-sh/uv/releases/download/${uvVer}/`; if (allFlag) { if (allFlag === 'all') { @@ -46,6 +40,14 @@ async function downloadUV() { return; } } + + const uvDownloaded = fs.existsSync(path.join('./assets', 'uv')); + if (!uvDownloaded) { + await downloadAndExtract(baseDownloadURL, options[os.platform()]); + return; + } + console.log('< UV Folder Exists, Skipping >'); + }; async function downloadAndExtract(baseURL, options) {