Address comments
This commit is contained in:
parent
6186179441
commit
4733419117
8 changed files with 20 additions and 8 deletions
|
|
@ -7,6 +7,8 @@ import * as fs from "fs";
|
|||
|
||||
import * as core from "@actions/core";
|
||||
|
||||
import * as actionsUtil from "./actions-util";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { wrapError } from "./util";
|
||||
|
||||
async function runWrapper() {
|
||||
|
|
@ -20,7 +22,12 @@ async function runWrapper() {
|
|||
`start-proxy post-action step failed: ${wrapError(error).message}`,
|
||||
);
|
||||
}
|
||||
if (core.isDebug()) {
|
||||
const config = await configUtils.getConfig(
|
||||
actionsUtil.getTemporaryDirectory(),
|
||||
core,
|
||||
);
|
||||
|
||||
if ((config && config.debugMode) || core.isDebug()) {
|
||||
const logFilePath = core.getState("proxy-log-file");
|
||||
if (logFilePath) {
|
||||
const readStream = fs.createReadStream(logFilePath);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ const CERT_SUBJECT = [
|
|||
},
|
||||
{
|
||||
name: "organizationName",
|
||||
value: "GitHub ic.",
|
||||
value: "GitHub inc.",
|
||||
},
|
||||
{
|
||||
shortName: "OU",
|
||||
|
|
@ -130,6 +130,7 @@ async function runWrapper() {
|
|||
});
|
||||
subprocess.on("exit", (code) => {
|
||||
if (code !== 0) {
|
||||
// If the proxy failed to start, try a different port from the ephemeral range [49152, 65535]
|
||||
port = Math.floor(Math.random() * (65535 - 49152) + 49152);
|
||||
subprocess = undefined;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue