5
0
mirror of https://github.com/astral-sh/setup-uv.git synced 2025-12-21 11:01:40 +00:00

Respect UV_CACHE_DIR and cache-dir (#612)

Fixes: #583
This commit is contained in:
Kevin Stillhammer
2025-10-07 16:08:30 +02:00
committed by GitHub
parent f610be5ff9
commit 535dc2664c
13 changed files with 1277 additions and 96 deletions

View File

@@ -1,6 +1,6 @@
import fs from "node:fs";
import * as core from "@actions/core";
import { getRequiredVersionFromConfigFile } from "./config-file";
import { getConfigValueFromTomlFile } from "../utils/config-file";
import { getUvVersionFromRequirementsFile } from "./requirements-file";
import { getUvVersionFromToolVersions } from "./tool-versions-file";
@@ -14,7 +14,7 @@ export function getUvVersionFromFile(filePath: string): string | undefined {
try {
uvVersion = getUvVersionFromToolVersions(filePath);
if (uvVersion === undefined) {
uvVersion = getRequiredVersionFromConfigFile(filePath);
uvVersion = getConfigValueFromTomlFile(filePath, "required-version");
}
if (uvVersion === undefined) {
uvVersion = getUvVersionFromRequirementsFile(filePath);