use temp dir

This commit is contained in:
Dmitry Shibanov 2023-06-22 12:21:37 +02:00
parent 992f068900
commit a585f51404
2 changed files with 2 additions and 2 deletions

2
dist/setup/index.js vendored
View file

@ -61445,7 +61445,7 @@ function installGoVersion(info, auth, arch) {
core.info(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`); core.info(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`);
// Windows requires that we keep the extension (.zip) for extraction // Windows requires that we keep the extension (.zip) for extraction
const isWindows = os_1.default.platform() === 'win32'; const isWindows = os_1.default.platform() === 'win32';
const tempDir = process.env.RUNNER_TEMP || '.'; const tempDir = os_1.default.tmpdir(); // process.env.RUNNER_TEMP || '.';
const fileName = isWindows ? path.join(tempDir, info.fileName) : undefined; const fileName = isWindows ? path.join(tempDir, info.fileName) : undefined;
const downloadPath = yield tc.downloadTool(info.downloadUrl, fileName, auth); const downloadPath = yield tc.downloadTool(info.downloadUrl, fileName, auth);
core.info('Extracting Go...'); core.info('Extracting Go...');

View file

@ -173,7 +173,7 @@ async function installGoVersion(
// Windows requires that we keep the extension (.zip) for extraction // Windows requires that we keep the extension (.zip) for extraction
const isWindows = os.platform() === 'win32'; const isWindows = os.platform() === 'win32';
const tempDir = process.env.RUNNER_TEMP || '.'; const tempDir = os.tmpdir(); // process.env.RUNNER_TEMP || '.';
const fileName = isWindows ? path.join(tempDir, info.fileName) : undefined; const fileName = isWindows ? path.join(tempDir, info.fileName) : undefined;
const downloadPath = await tc.downloadTool(info.downloadUrl, fileName, auth); const downloadPath = await tc.downloadTool(info.downloadUrl, fileName, auth);