mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-05-18 07:04:45 +00:00
parent
a7e15805d2
commit
2e657c127d
3 changed files with 18 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue