- only create the temp dir if it does not exist

This commit is contained in:
Mike Penz
2023-08-25 08:25:16 +00:00
committed by GitHub
parent a72c0bbc47
commit 8af70e55a6
3 changed files with 3 additions and 3 deletions
Generated Vendored
+1 -1
View File
@@ -2597,7 +2597,7 @@ function writeCacheData(data, cacheOutput) {
cacheFile = cacheOutput; cacheFile = cacheOutput;
} }
else { else {
if (process_1.env.RUNNER_TEMP) { if (process_1.env.RUNNER_TEMP && !fs.existsSync(process_1.env.RUNNER_TEMP)) {
fs.mkdirSync(process_1.env.RUNNER_TEMP); fs.mkdirSync(process_1.env.RUNNER_TEMP);
} }
cacheFile = `${process_1.env.RUNNER_TEMP}/rcba-cache.json`; cacheFile = `${process_1.env.RUNNER_TEMP}/rcba-cache.json`;
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -32,7 +32,7 @@ export function writeCacheData(data: Data, cacheOutput: string | null): void {
// However, this can result in a "Argument list too long" exception for very long caches // However, this can result in a "Argument list too long" exception for very long caches
cacheFile = cacheOutput cacheFile = cacheOutput
} else { } else {
if (env.RUNNER_TEMP) { if (env.RUNNER_TEMP && !fs.existsSync(env.RUNNER_TEMP)) {
fs.mkdirSync(env.RUNNER_TEMP) fs.mkdirSync(env.RUNNER_TEMP)
} }
cacheFile = `${env.RUNNER_TEMP}/rcba-cache.json` cacheFile = `${env.RUNNER_TEMP}/rcba-cache.json`