Skip to content

Commit

Permalink
srv environment now exports VCAP_APPLICATION (#55)
Browse files Browse the repository at this point in the history
Co-authored-by: d060338 <[email protected]>
  • Loading branch information
Kkoile and d060338 authored Jan 9, 2024
1 parent 6327401 commit f1a8606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/submodules/serverDiagnostic.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ const _serverDebug = async (context, { appName, appInstance = 0 } = {}) => {
const serverDebug = async (context, [appName, appInstance]) => _serverDebug(context, { appName, appInstance });

const serverEnvironment = async (context, [appName]) => {
const { cfEnvServices, cfEnvVariables } = appName
const { cfEnvServices, cfEnvApp, cfEnvVariables } = appName
? await context.getAppNameInfoCached(appName)
: await context.getSrvInfo();
writeFileSync(
DEFAULT_ENV_FILENAME,
orderedStringify({ VCAP_SERVICES: cfEnvServices, ...cfEnvVariables }, null, 2) + "\n"
orderedStringify({ VCAP_SERVICES: cfEnvServices, VCAP_APPLICATION: cfEnvApp, ...cfEnvVariables }, null, 2) + "\n"
);
console.log(`saved system environment to ${DEFAULT_ENV_FILENAME}`);
};
Expand Down

0 comments on commit f1a8606

Please sign in to comment.