mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 01:27:22 +00:00
Print proxy log when debugging is enabled
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
* It will run after the all steps in this job, in reverse order in relation to
|
||||
* other `post:` hooks.
|
||||
*/
|
||||
import * as fs from "fs";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
|
||||
import { wrapError } from "./util";
|
||||
@@ -18,6 +20,13 @@ async function runWrapper() {
|
||||
`start-proxy post-action step failed: ${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();
|
||||
|
||||
Reference in New Issue
Block a user