Throw is RUNNER_TEMP is not set

This commit is contained in:
Kevin Stillhammer 2024-09-19 14:57:21 +02:00
parent e7129688fa
commit 7ee2c111fb
No known key found for this signature in database
3 changed files with 33 additions and 18 deletions

15
dist/save-cache/index.js generated vendored
View file

@ -83026,7 +83026,10 @@ function getToolBinDir() {
return toolBinDirInput;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\uv-tool-bin-dir";
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path_1.default.sep}uv-tool-bin-dir`;
}
throw Error("Could not determine UV_TOOL_BIN_DIR. Please make sure RUNNER_TEMP is set or provide the tool-bin-dir input");
}
return undefined;
}
@ -83036,7 +83039,10 @@ function getToolDir() {
return toolDirInput;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\uv-tool-dir";
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path_1.default.sep}uv-tool-dir`;
}
throw Error("Could not determine UV_TOOL_DIR. Please make sure RUNNER_TEMP is set or provide the tool-dir input");
}
return undefined;
}
@ -83048,10 +83054,7 @@ function getCacheLocalPath() {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path_1.default.sep}setup-uv-cache`;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\setup-uv-cache";
}
return "/tmp/setup-uv-cache";
throw Error("Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input");
}

15
dist/setup/index.js generated vendored
View file

@ -90183,7 +90183,10 @@ function getToolBinDir() {
return toolBinDirInput;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\uv-tool-bin-dir";
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path_1.default.sep}uv-tool-bin-dir`;
}
throw Error("Could not determine UV_TOOL_BIN_DIR. Please make sure RUNNER_TEMP is set or provide the tool-bin-dir input");
}
return undefined;
}
@ -90193,7 +90196,10 @@ function getToolDir() {
return toolDirInput;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\uv-tool-dir";
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path_1.default.sep}uv-tool-dir`;
}
throw Error("Could not determine UV_TOOL_DIR. Please make sure RUNNER_TEMP is set or provide the tool-dir input");
}
return undefined;
}
@ -90205,10 +90211,7 @@ function getCacheLocalPath() {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path_1.default.sep}setup-uv-cache`;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\setup-uv-cache";
}
return "/tmp/setup-uv-cache";
throw Error("Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input");
}

View file

@ -17,7 +17,12 @@ function getToolBinDir(): string | undefined {
return toolBinDirInput;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\uv-tool-bin-dir";
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path.sep}uv-tool-bin-dir`;
}
throw Error(
"Could not determine UV_TOOL_BIN_DIR. Please make sure RUNNER_TEMP is set or provide the tool-bin-dir input",
);
}
return undefined;
}
@ -28,7 +33,12 @@ function getToolDir(): string | undefined {
return toolDirInput;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\uv-tool-dir";
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path.sep}uv-tool-dir`;
}
throw Error(
"Could not determine UV_TOOL_DIR. Please make sure RUNNER_TEMP is set or provide the tool-dir input",
);
}
return undefined;
}
@ -41,8 +51,7 @@ function getCacheLocalPath(): string {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\setup-uv-cache";
}
return "/tmp/setup-uv-cache";
throw Error(
"Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input",
);
}