Skip to content

Commit 5ced605

Browse files
authored
Always verify and update app connection strings (#4853)
1 parent 7225304 commit 5ced605

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/commands/deploy/verifyAppSettings.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,28 @@ export async function verifyAppSettings(options: {
4242
const appSettings: StringDictionary = options.appSettings;
4343
let updateAppSettings: boolean = false;
4444
// these were checks for consumption and app service hosted plans
45-
if (appSettings.properties && !bools.isFlexConsumption) {
46-
const remoteRuntime: string | undefined = appSettings.properties[workerRuntimeKey];
47-
await verifyVersionAndLanguage(context, projectPath, node.site.fullName, version, language, appSettings.properties);
48-
49-
// update the settings if the remote runtime was changed
50-
updateAppSettings = appSettings.properties[workerRuntimeKey] !== remoteRuntime;
51-
if (node.site.isLinux) {
52-
const remoteBuildSettingsChanged = verifyLinuxRemoteBuildSettings(context, appSettings.properties, bools);
53-
updateAppSettings ||= remoteBuildSettingsChanged;
45+
if (appSettings.properties) {
46+
if (!bools.isFlexConsumption) {
47+
const remoteRuntime: string | undefined = appSettings.properties[workerRuntimeKey];
48+
await verifyVersionAndLanguage(context, projectPath, node.site.fullName, version, language, appSettings.properties);
49+
50+
// update the settings if the remote runtime was changed
51+
updateAppSettings = appSettings.properties[workerRuntimeKey] !== remoteRuntime;
52+
if (node.site.isLinux) {
53+
const remoteBuildSettingsChanged = verifyLinuxRemoteBuildSettings(context, appSettings.properties, bools);
54+
updateAppSettings ||= remoteBuildSettingsChanged;
55+
} else {
56+
updateAppSettings ||= verifyRunFromPackage(context, node.site, appSettings.properties);
57+
}
5458
} else {
55-
updateAppSettings ||= verifyRunFromPackage(context, node.site, appSettings.properties);
59+
const workspace = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(context.originalDeployFsPath));
60+
const localSettingsPath: string | undefined = await tryGetLocalSettingsFileNoPrompt(context, workspace);
61+
const localSettings = localSettingsPath ? await getLocalSettingsJson(context, localSettingsPath, false) : {};
62+
updateAppSettings = await verifyFeatureFlagSetting(context, appSettings.properties, localSettings);
5663
}
5764

5865
const updatedRemoteConnection: boolean = await verifyAndUpdateAppConnectionStrings(context, durableStorageType, appSettings.properties);
5966
updateAppSettings ||= updatedRemoteConnection;
60-
61-
62-
} else if (appSettings.properties && bools.isFlexConsumption) {
63-
const workspace = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(context.originalDeployFsPath));
64-
const localSettingsPath: string | undefined = await tryGetLocalSettingsFileNoPrompt(context, workspace);
65-
const localSettings = localSettingsPath ? await getLocalSettingsJson(context, localSettingsPath, false) : {};
66-
updateAppSettings = await verifyFeatureFlagSetting(context, appSettings.properties, localSettings);
6767
}
6868

6969
if (updateAppSettings) {

0 commit comments

Comments
 (0)