in src/commonHelper.ts [93:112]
function updateProjects(unsupportedProjects: Array<ProjectInformation>, maxRequiredSDK: string, commandObserver: CommandObserver) {
unsupportedProjects.forEach((project) => {
let projectPath = project.path;
let fileContent = fs.readFileSync(projectPath, 'utf8');
commandObserver.logToOutputChannel(localize('extension.updatingSdkMessage', "Updating PostgreSQL SDK version for file {0}.", projectPath));
try {
fileContent = getUpdatedXML(fileContent, project.sdkReferenceType, maxRequiredSDK)
fs.writeFile(project.path, fileContent, (err) => {
if (err) {
commandObserver.logToOutputChannel(localize('extension.updatingSdkErrorMessage', 'Error updating SDK version for file {0}.', projectPath));
} else {
commandObserver.logToOutputChannel(localize('extension.sdkUpdateCompleteMessage', 'Project file {0} has been updated.', projectPath));
}
});
}
catch (err) {
commandObserver.logToOutputChannel(localize('extension.updatingSdkErrorMessage', 'Error updating SDK version for file {0}.', projectPath));
}
});
}