Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "+ Create new function app" error while deploying #4184

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/commands/deploy/getOrCreateFunctionApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ext } from "../../extensionVariables";
import { localize } from "../../localize";
import { ResolvedFunctionAppResource } from "../../tree/ResolvedFunctionAppResource";
import { type SlotTreeItem } from "../../tree/SlotTreeItem";
import { ResolvedContainerizedFunctionAppResource } from "../../tree/containerizedFunctionApp/ResolvedContainerizedFunctionAppResource";
import { SubscriptionListStep } from "../SubscriptionListStep";
import { type IFunctionAppWizardContext } from "../createFunctionApp/IFunctionAppWizardContext";
import { FunctionAppListStep } from "./FunctionAppListStep";
Expand All @@ -31,10 +32,12 @@ export async function getOrCreateFunctionApp(context: IFuncDeployContext & Parti
context.activityTitle = localize('functionAppCreateActivityTitle', 'Create Function App "{0}"', nonNullProp(context, 'newSiteName'))
await wizard.execute();

const resolved = new ResolvedFunctionAppResource(context as ISubscriptionContext, nonNullProp(context, 'site'));
const resolved = context.dockerfilePath ? new ResolvedContainerizedFunctionAppResource(context as ISubscriptionContext, nonNullProp(context, 'site')) :
new ResolvedFunctionAppResource(context as ISubscriptionContext, nonNullProp(context, 'site'));
node = await ext.rgApi.tree.findTreeItem(resolved.id, context);

await ext.rgApi.tree.refresh(context);

node = await ext.rgApi.tree.findTreeItem(resolved.id, context);
context.isNewApp = true;
}

Expand Down
Loading