mirror of
https://github.com/github/codeql-action.git
synced 2026-05-04 12:50:14 +00:00
Add JSDoc and a little extra logging for startProxy
This commit is contained in:
Generated
+1
@@ -104271,6 +104271,7 @@ async function startProxy(binPath, config, logFilePath, logger) {
|
||||
let tries = 5;
|
||||
let subprocessError = void 0;
|
||||
while (tries-- > 0 && !subprocess && !subprocessError) {
|
||||
logger.info(`Attempting to start proxy on ${host}:${port}...`);
|
||||
subprocess = (0, import_child_process.spawn)(
|
||||
binPath,
|
||||
["-addr", `${host}:${port}`, "-config", "-", "-logfile", logFilePath],
|
||||
|
||||
@@ -220,6 +220,15 @@ async function runWrapper() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the proxy process with the binary at `binPath` using `config` on a random
|
||||
* port (but always starting with 49152).
|
||||
*
|
||||
* @param binPath The path to the proxy binary.
|
||||
* @param config The configuration for the proxy.
|
||||
* @param logFilePath The path for the proxy log file.
|
||||
* @param logger The logger to use.
|
||||
*/
|
||||
async function startProxy(
|
||||
binPath: string,
|
||||
config: ProxyConfig,
|
||||
@@ -232,6 +241,7 @@ async function startProxy(
|
||||
let tries = 5;
|
||||
let subprocessError: Error | undefined = undefined;
|
||||
while (tries-- > 0 && !subprocess && !subprocessError) {
|
||||
logger.info(`Attempting to start proxy on ${host}:${port}...`);
|
||||
subprocess = spawn(
|
||||
binPath,
|
||||
["-addr", `${host}:${port}`, "-config", "-", "-logfile", logFilePath],
|
||||
|
||||
Reference in New Issue
Block a user