diff --git a/CHANGELOG.md b/CHANGELOG.md index 3673f72..4ec6490 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - srv: fix debug command type mixture bug where app instance argument was ignored +- srv: fix certificate dump command + ## v0.9.2 - 2024-12-13 ### Fixed diff --git a/src/context.js b/src/context.js index dd246f9..4ab60cd 100644 --- a/src/context.js +++ b/src/context.js @@ -211,6 +211,7 @@ const _cfSsh = async (appName, { localPort, remotePort, remoteHostname, appInsta const [stdout, stderr] = await _run(...args); stderr && logger.error(stderr); stdout && logger.info(stdout); + return [stdout, stderr]; } catch (err) { return fail( "caught error during cf ssh: %s", diff --git a/src/submodules/serverDiagnostic.js b/src/submodules/serverDiagnostic.js index 8eee47a..49716a8 100644 --- a/src/submodules/serverDiagnostic.js +++ b/src/submodules/serverDiagnostic.js @@ -57,7 +57,7 @@ const _serverDebug = async (context, { appName, appInstance } = {}) => { logger.info(`connect ${runtime ? runtime + " debugger" : "debugger"} on port ${localPort}`); logger.info(`use request header "X-Cf-App-Instance: ${cfAppGuid}:${appInstance}" to target this app instance`); logger.info(); - return cfSsh({ localPort, remotePort, appInstance }); + await cfSsh({ localPort, remotePort, appInstance }); }; const serverDebug = async (context, [appName, appInstance = "0"]) => { @@ -90,7 +90,7 @@ const serverCertificates = async (context, [appName, appInstance = "0"]) => { const serverStartDebugger = async (context, [appName, appInstance = "0"]) => { assert(/\d+/.test(appInstance), `argument "${appInstance}" is not a valid app instance`); const { cfSsh } = appName ? await context.getAppNameInfoCached(appName) : await context.getSrvInfo(); - return cfSsh({ command: "pkill --signal SIGUSR1 node", appInstance }); + await cfSsh({ command: "pkill --signal SIGUSR1 node", appInstance }); }; module.exports = {