Skip to content

Commit

Permalink
Handle null to blank for configmgr update
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs committed Apr 2, 2024
1 parent fa2ec5b commit bef14be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/libs/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ export function generateInstanceEnvFromYamlConfig(haInstance: string) {
componentFileArray.push(`ZWE_configs_${key}=${envs['ZWE_components_'+componentAlpha+'_'+key]}`);
}
});


componentFileArray = componentFileArray.map((row)=> { return row.endsWith('=null') ? row.substring(0, row.length-5)+'=' : row });
const componentFileContent = componentFileArray.join('\n');
rc = xplatform.storeFileUTF8(`${folderName}/.instance-${haInstance}.env`, xplatform.AUTO_DETECT, componentFileContent);
if (rc) {
Expand All @@ -200,6 +201,7 @@ export function generateInstanceEnvFromYamlConfig(haInstance: string) {
}
});

envFileArray = envFileArray.map((row)=> { return row.endsWith('=null') ? row.substring(0, row.length-5)+'=' : row });
let envFileContent = envFileArray.join('\n');
let rc = xplatform.storeFileUTF8(`${zwePrivateWorkspaceEnvDir}/.instance-${haInstance}.env`, xplatform.AUTO_DETECT, envFileContent);
if (rc) {
Expand Down

0 comments on commit bef14be

Please sign in to comment.