leave uv.exe in D:

This commit is contained in:
Kevin Stillhammer 2024-09-18 20:49:20 +02:00
parent 363497d0ae
commit 2233977af9
No known key found for this signature in database
3 changed files with 4 additions and 16 deletions

View File

@ -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
View File

@ -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) {

View File

@ -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> {