Skip to content

Commit fa2f632

Browse files
authored
Fix deploy error (#352)
1 parent 71b4358 commit fa2f632

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/tree/ContainerAppItem.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { ContainerApp, ContainerAppsAPIClient, KnownActiveRevisionsMode } from "@azure/arm-appcontainers";
77
import { getResourceGroupFromId, uiUtils } from "@microsoft/vscode-azext-azureutils";
8-
import { AzureWizard, DeleteConfirmationStep, IActionContext, callWithTelemetryAndErrorHandling, createSubscriptionContext, nonNullProp } from "@microsoft/vscode-azext-utils";
8+
import { AzureWizard, DeleteConfirmationStep, IActionContext, callWithTelemetryAndErrorHandling, createSubscriptionContext, nonNullProp, nonNullValue } from "@microsoft/vscode-azext-utils";
99
import { AzureSubscription, ViewPropertiesModel } from "@microsoft/vscode-azureresources-api";
1010
import { TreeItem, TreeItemCollapsibleState, Uri } from "vscode";
1111
import { DeleteAllContainerAppsStep } from "../commands/deleteContainerApp/DeleteAllContainerAppsStep";
@@ -154,7 +154,12 @@ export async function getContainerEnvelopeWithSecrets(context: IActionContext, s
154154

155155
// verify all top-level properties
156156
for (const key of Object.keys(containerAppEnvelope)) {
157-
containerAppEnvelope[key] = nonNullProp(containerAppEnvelope, <keyof ContainerApp>key);
157+
// We know it's undefined but we want it to throw the error
158+
if (containerAppEnvelope[key] === undefined) {
159+
nonNullValue(containerAppEnvelope[key]);
160+
}
161+
162+
containerAppEnvelope[key] = containerAppEnvelope[<keyof ContainerApp>key];
158163
}
159164

160165
const concreteContainerAppEnvelope = <Required<ContainerApp>>containerAppEnvelope;

0 commit comments

Comments
 (0)