Skip to content

Commit

Permalink
revert.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Nov 12, 2024
1 parent 28f13eb commit c9190b4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/downloadUV.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand 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) {
Expand Down

0 comments on commit c9190b4

Please sign in to comment.