Print proxy log when debugging is enabled
This commit is contained in:
parent
7b43b7c7ca
commit
6186179441
6 changed files with 22 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue