mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-07-28 16:51:38 +00:00
committed by
GitHub
parent
a7e15805d2
commit
2e657c127d
@ -23,13 +23,15 @@ export async function downloadLatest(
|
||||
|
||||
const downloadPath = await tc.downloadTool(
|
||||
downloadUrl,
|
||||
`${artifact}${extension}`,
|
||||
undefined,
|
||||
githubToken,
|
||||
);
|
||||
let uvExecutablePath: string;
|
||||
let uvDir: string;
|
||||
if (platform === "pc-windows-msvc") {
|
||||
uvDir = await tc.extractZip(downloadPath);
|
||||
const fullPathWithExtension = `${downloadPath}${extension}`;
|
||||
await fs.copyFile(downloadPath, fullPathWithExtension);
|
||||
uvDir = await tc.extractZip(fullPathWithExtension);
|
||||
// On windows extracting the zip does not create an intermediate directory
|
||||
uvExecutablePath = path.join(uvDir, "uv.exe");
|
||||
} else {
|
||||
|
@ -40,7 +40,7 @@ export async function downloadVersion(
|
||||
|
||||
const downloadPath = await tc.downloadTool(
|
||||
downloadUrl,
|
||||
`${artifact}${extension}`,
|
||||
undefined,
|
||||
githubToken,
|
||||
);
|
||||
await validateChecksum(
|
||||
@ -53,7 +53,9 @@ export async function downloadVersion(
|
||||
|
||||
let uvDir: string;
|
||||
if (platform === "pc-windows-msvc") {
|
||||
uvDir = await tc.extractZip(downloadPath);
|
||||
const fullPathWithExtension = `${downloadPath}${extension}`;
|
||||
await fs.copyFile(downloadPath, fullPathWithExtension);
|
||||
uvDir = await tc.extractZip(fullPathWithExtension);
|
||||
// On windows extracting the zip does not create an intermediate directory
|
||||
} else {
|
||||
const extractedDir = await tc.extractTar(downloadPath);
|
||||
|
Reference in New Issue
Block a user