mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-02-23 00:55:22 +08:00
leave uv.exe in D:
This commit is contained in:
parent
363497d0ae
commit
2233977af9
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@ -109,15 +109,10 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os: [windows-latest]
|
||||||
[
|
|
||||||
windows-latest,
|
|
||||||
]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install default version
|
- name: Install default version
|
||||||
uses: ./
|
uses: ./
|
||||||
- run: mkdir D:\a\_temp\uv-tool-bin-dir
|
|
||||||
- run: mv C:\hostedtoolcache\windows\uv\0.4.12\x86_64\uv.exe D:\a\_temp\uv-tool-bin-dir\uv.exe
|
|
||||||
- run: uv tool install ruff
|
- run: uv tool install ruff
|
||||||
- run: ruff --version
|
- run: ruff --version
|
||||||
|
3
dist/setup/index.js
generated
vendored
3
dist/setup/index.js
generated
vendored
@ -89835,8 +89835,7 @@ function downloadLatest(platform, arch, checkSum, githubToken) {
|
|||||||
}
|
}
|
||||||
const version = yield getVersion(uvExecutablePath);
|
const version = yield getVersion(uvExecutablePath);
|
||||||
yield (0, checksum_1.validateChecksum)(checkSum, downloadPath, arch, platform, version);
|
yield (0, checksum_1.validateChecksum)(checkSum, downloadPath, arch, platform, version);
|
||||||
const cachedToolDir = yield tc.cacheDir(uvDir, constants_1.TOOL_CACHE_NAME, version, arch);
|
return { cachedToolDir: uvDir, version };
|
||||||
return { cachedToolDir, version };
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getVersion(uvExecutablePath) {
|
function getVersion(uvExecutablePath) {
|
||||||
|
@ -4,7 +4,7 @@ import * as exec from "@actions/exec";
|
|||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import { Architecture, Platform } from "../utils/platforms";
|
import { Architecture, Platform } from "../utils/platforms";
|
||||||
import { validateChecksum } from "./checksum/checksum";
|
import { validateChecksum } from "./checksum/checksum";
|
||||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
import { OWNER, REPO } from "../utils/constants";
|
||||||
|
|
||||||
export async function downloadLatest(
|
export async function downloadLatest(
|
||||||
platform: Platform,
|
platform: Platform,
|
||||||
@ -39,14 +39,8 @@ export async function downloadLatest(
|
|||||||
}
|
}
|
||||||
const version = await getVersion(uvExecutablePath);
|
const version = await getVersion(uvExecutablePath);
|
||||||
await validateChecksum(checkSum, downloadPath, arch, platform, version);
|
await validateChecksum(checkSum, downloadPath, arch, platform, version);
|
||||||
const cachedToolDir = await tc.cacheDir(
|
|
||||||
uvDir,
|
|
||||||
TOOL_CACHE_NAME,
|
|
||||||
version,
|
|
||||||
arch,
|
|
||||||
);
|
|
||||||
|
|
||||||
return { cachedToolDir, version };
|
return { cachedToolDir: uvDir, version };
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getVersion(uvExecutablePath: string): Promise<string> {
|
async function getVersion(uvExecutablePath: string): Promise<string> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user