Skip to content

Commit

Permalink
srv: fix server certificate dump
Browse files Browse the repository at this point in the history
  • Loading branch information
rlindner81 committed Jan 22, 2025
1 parent 8970149 commit 854a941
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/submodules/serverDiagnostic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]) => {
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 854a941

Please sign in to comment.