From 1181f42014579a30b2c939d9c00481907ffbd93f Mon Sep 17 00:00:00 2001 From: Maneesh Tewani Date: Tue, 25 Feb 2025 16:37:23 -0800 Subject: [PATCH 1/2] Fix issue where apps:init doesn't work when there isn't already an existing app --- src/commands/apps-init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/apps-init.ts b/src/commands/apps-init.ts index de5d30811d8..3527126a1eb 100644 --- a/src/commands/apps-init.ts +++ b/src/commands/apps-init.ts @@ -92,7 +92,7 @@ export const command = new Command("apps:init [platform] [appId]") } catch (e) { if ((e as Error).message.includes("associated with this Firebase project")) { const projectId = needProjectId(options); - await sdkInit(platform, { ...options, project: projectId }); + await sdkInit(detectedPlatform, { ...options, project: projectId }); } else { throw e; } From 0d9784fe534e5e639edcfa9ddfaeb540fa25c6f9 Mon Sep 17 00:00:00 2001 From: Maneesh Tewani Date: Tue, 25 Feb 2025 16:38:42 -0800 Subject: [PATCH 2/2] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 697303b2844..d235bfa9486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,3 @@ - Add initial delay when loading python functions (#8239) - Enforce webframeworks enablement only on webframeworks sites (#8168) +- Fix issue where `apps:init` throws an error upon app creation