SDA-1895 - Escape backslash characters for autoLaunchPath (#944)

This commit is contained in:
Kiran Niranjan 2020-03-26 18:24:57 +05:30 committed by GitHub
parent d685be3eb6
commit 86854315b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,6 +171,9 @@ ipcMain.on(apiName.symphonyApi, async (event: Electron.IpcMainEvent, arg: IApiAr
break;
case apiCmds.setCloudConfig:
const { podLevelEntitlements, acpFeatureLevelEntitlements, pmpEntitlements, ...rest } = arg.cloudConfig as ICloudConfig;
if (podLevelEntitlements && podLevelEntitlements.autoLaunchPath && podLevelEntitlements.autoLaunchPath.match(/\\\\/g)) {
podLevelEntitlements.autoLaunchPath = podLevelEntitlements.autoLaunchPath.replace(/\\+/g, '\\');
}
logger.info('main-api-handler: ignored other values from SFE', rest);
await config.updateCloudConfig({ podLevelEntitlements, acpFeatureLevelEntitlements, pmpEntitlements });
await updateFeaturesForCloudConfig();