@@ -66081,13 +66081,15 @@ const IS_WINDOWS = process.platform === 'win32';
6608166081const toolExtension = IS_WINDOWS ? '.exe' : '.sh';
6608266082const toolPath = `${steamcmd}${toolExtension}`;
6608366083async function Run() {
66084- const [toolDirectory, steamDir ] = await findOrDownload();
66084+ const [toolDirectory, steam_dir ] = await findOrDownload();
6608566085 core.info(`${STEAM_CMD} -> ${toolDirectory}`);
6608666086 core.addPath(toolDirectory);
6608766087 const steam_cmd = path.join(toolDirectory, steamcmd, '..');
6608866088 core.exportVariable(STEAM_CMD, steam_cmd);
66089- core.info(`${STEAM_DIR} -> ${steamDir}`);
66090- core.exportVariable(STEAM_DIR, steamDir);
66089+ core.saveState('STEAM_CMD', steam_cmd);
66090+ core.info(`${STEAM_DIR} -> ${steam_dir}`);
66091+ core.exportVariable(STEAM_DIR, steam_dir);
66092+ core.saveState('STEAM_DIR', steam_dir);
6609166093 const steam_temp = path.join(process.env.RUNNER_TEMP, '.steamworks');
6609266094 try {
6609366095 await fs.promises.access(steam_temp, fs.constants.R_OK | fs.constants.W_OK);
@@ -66097,8 +66099,9 @@ async function Run() {
6609766099 }
6609866100 core.info(`${STEAM_TEMP} -> ${steam_temp}`);
6609966101 core.exportVariable(STEAM_TEMP, steam_temp);
66100- await exec.exec(steamcmd, ['+help', '+quit']);
66101- await restoreConfigCache(steamDir);
66102+ core.saveState('STEAM_TEMP', steam_temp);
66103+ await exec.exec(steamcmd, ['+help', '+quit'], { ignoreReturnCode: true });
66104+ await restoreConfigCache(steam_dir);
6610266105}
6610366106async function findOrDownload() {
6610466107 const allVersions = tc.findAllVersions(steamcmd);
@@ -79825,12 +79828,30 @@ const main = async () => {
7982579828 else {
7982679829 await (0, setup_1.SaveConfigCache)();
7982779830 core.info('steamcmd logs:');
79828- await logging.PrintLogs(process.env.STEAM_TEMP);
79831+ const steam_temp = core.getState('STEAM_TEMP');
79832+ if (!steam_temp) {
79833+ core.error('STEAM_TEMP is not set, skipping logs');
79834+ }
79835+ else {
79836+ await logging.PrintLogs(steam_temp);
79837+ }
7982979838 if (process.platform === 'win32') {
79830- await logging.PrintLogs(process.env.STEAM_CMD, true);
79839+ const steamCmd = core.getState('STEAM_CMD');
79840+ if (!steamCmd) {
79841+ core.error('STEAM_CMD is not set, skipping logs');
79842+ }
79843+ else {
79844+ await logging.PrintLogs(steamCmd, true);
79845+ }
7983179846 }
7983279847 else {
79833- await logging.PrintLogs(process.env.STEAM_DIR, true);
79848+ const steamDir = core.getState('STEAM_DIR');
79849+ if (!steamDir) {
79850+ core.error('STEAM_DIR is not set, skipping logs');
79851+ }
79852+ else {
79853+ await logging.PrintLogs(steamDir);
79854+ }
7983479855 }
7983579856 }
7983679857};
0 commit comments