Print proxy log when debugging is enabled

This commit is contained in:
Arthur Baars 2024-07-09 12:03:02 +02:00
parent 7b43b7c7ca
commit 6186179441
6 changed files with 22 additions and 2 deletions

View file

@ -28,6 +28,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
* It will run after the all steps in this job, in reverse order in relation to
* other `post:` hooks.
*/
const fs = __importStar(require("fs"));
const core = __importStar(require("@actions/core"));
const util_1 = require("./util");
async function runWrapper() {
@ -40,6 +41,13 @@ async function runWrapper() {
catch (error) {
core.setFailed(`start-proxy post-action step failed: ${(0, util_1.wrapError)(error).message}`);
}
if (core.isDebug()) {
const logFilePath = core.getState("proxy-log-file");
if (logFilePath) {
const readStream = fs.createReadStream(logFilePath);
readStream.pipe(process.stdout, { end: true });
}
}
}
void runWrapper();
//# sourceMappingURL=start-proxy-action-post.js.map