Skip to content
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
5 changes: 5 additions & 0 deletions src/commands/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ async function deploy(actionContext: IActionContext, arg1: vscode.Uri | string |
await node.initSite(context);
const site = node.site;

// Check if the function app is stopped and block deployment with a clear error message
if (site.rawSite.state?.toLowerCase() === 'stopped') {
throw new Error(localize('functionAppStoppedError', 'Cannot deploy to function app "{0}" because it is currently stopped. Please start the function app before deploying.', site.fullName));
}

const subscriptionContext: ISubscriptionContext & { subscription: AzureSubscription } = {
...node.subscription,
subscription: await subscriptionExperience(context, ext.rgApiV2.resources.azureResourceTreeDataProvider, {
Expand Down