interpret relative inputs as under working-directory (#498)
Some checks failed
test / lint (push) Failing after 2s
test / test-specific-version (0.3.0) (push) Failing after 2s
test / test-specific-version (>=0.3.0) (push) Failing after 2s
test / test-pyproject-file-version (push) Failing after 1s
test / test-version-file-version (push) Failing after 1s
test / test-uvx (push) Failing after 1s
test / test-activate-environment (ubuntu-latest) (push) Failing after 1s
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 1s
test / test-setup-cache-dependency-glob (push) Failing after 1s
test / test-restore-cache-dependency-glob (push) Has been skipped
test / test-custom-manifest-file (push) Failing after 1s
test / test-default-version (ubuntu-latest) (push) Successful in 41s
test / test-specific-version (0.3.2) (push) Successful in 54s
test / test-semver-range (ubuntu-latest) (push) Successful in 54s
test / test-specific-version (0.3.x) (push) Successful in 1m3s
test / test-musl (push) Failing after 1m16s
test / test-uv-file-version (push) Successful in 1m22s
test / test-malformed-pyproject-file-fallback (push) Successful in 1m23s
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 1m20s
test / test-pep440-version (push) Successful in 1m31s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Successful in 1m34s
test / test-absolute-path (push) Successful in 1m27s
test / test-tool-install (ubuntu-latest) (push) Successful in 1m47s
CodeQL / Analyze (TypeScript) (push) Failing after 2m9s
test / test-setup-cache (true, ubuntu-latest) (push) Successful in 2m10s
test / test-setup-cache-requirements-txt (push) Successful in 2m30s
test / test-with-explicit-token (push) Successful in 2m54s
test / test-specific-version (0.3) (push) Successful in 3m16s
test / test-setup-cache (auto, ubuntu-latest) (push) Successful in 3m16s
test / test-no-python-version (push) Successful in 4m36s
test / test-python-version (ubuntu-latest) (push) Failing after 9m37s
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-semver-range (selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-default-version (macos-14) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-tool-install (macos-latest) (push) Has been cancelled
test / test-tool-install (windows-latest) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache-requirements-txt (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled

Fixes: #441
This commit is contained in:
Kevin Stillhammer
2025-07-23 15:29:01 +02:00
committed by GitHub
parent 23482a31a8
commit 2c7142f755
4 changed files with 102 additions and 13 deletions

31
dist/setup/index.js generated vendored
View File

@ -125534,7 +125534,7 @@ exports.checkSum = core.getInput("checksum");
exports.enableCache = getEnableCache();
exports.cacheSuffix = core.getInput("cache-suffix") || "";
exports.cacheLocalPath = getCacheLocalPath();
exports.cacheDependencyGlob = core.getInput("cache-dependency-glob");
exports.cacheDependencyGlob = getCacheDependencyGlob();
exports.pruneCache = core.getInput("prune-cache") === "true";
exports.ignoreNothingToCache = core.getInput("ignore-nothing-to-cache") === "true";
exports.ignoreEmptyWorkdir = core.getInput("ignore-empty-workdir") === "true";
@ -125553,7 +125553,8 @@ function getEnableCache() {
function getToolBinDir() {
const toolBinDirInput = core.getInput("tool-bin-dir");
if (toolBinDirInput !== "") {
return expandTilde(toolBinDirInput);
const tildeExpanded = expandTilde(toolBinDirInput);
return resolveRelativePath(tildeExpanded);
}
if (process.platform === "win32") {
if (process.env.RUNNER_TEMP !== undefined) {
@ -125566,7 +125567,8 @@ function getToolBinDir() {
function getToolDir() {
const toolDirInput = core.getInput("tool-dir");
if (toolDirInput !== "") {
return expandTilde(toolDirInput);
const tildeExpanded = expandTilde(toolDirInput);
return resolveRelativePath(tildeExpanded);
}
if (process.platform === "win32") {
if (process.env.RUNNER_TEMP !== undefined) {
@ -125579,7 +125581,8 @@ function getToolDir() {
function getCacheLocalPath() {
const cacheLocalPathInput = core.getInput("cache-local-path");
if (cacheLocalPathInput !== "") {
return expandTilde(cacheLocalPathInput);
const tildeExpanded = expandTilde(cacheLocalPathInput);
return resolveRelativePath(tildeExpanded);
}
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
if (process.env.RUNNER_TEMP !== undefined) {
@ -125592,12 +125595,32 @@ function getCacheLocalPath() {
}
return `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`;
}
function getCacheDependencyGlob() {
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
if (cacheDependencyGlobInput !== "") {
return cacheDependencyGlobInput
.split("\n")
.map((part) => part.trim())
.map((part) => expandTilde(part))
.map((part) => resolveRelativePath(part))
.join("\n");
}
return cacheDependencyGlobInput;
}
function expandTilde(input) {
if (input.startsWith("~")) {
return `${process.env.HOME}${input.substring(1)}`;
}
return input;
}
function resolveRelativePath(inputPath) {
if (node_path_1.default.isAbsolute(inputPath)) {
return inputPath;
}
const absolutePath = `${exports.workingDirectory}${node_path_1.default.sep}${inputPath}`;
core.debug(`Resolving relative path ${inputPath} to ${absolutePath}`);
return absolutePath;
}
function getManifestFile() {
const manifestFileInput = core.getInput("manifest-file");
if (manifestFileInput !== "") {