From 6273d2535a7379d59dd9df1ff9c55aedccb70d92 Mon Sep 17 00:00:00 2001 From: aalej Date: Tue, 16 Dec 2025 18:09:59 +0800 Subject: [PATCH] add dataconnect sdk app setup validation --- src/init/features/dataconnect/sdk.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/init/features/dataconnect/sdk.ts b/src/init/features/dataconnect/sdk.ts index 873aaed0e2b..5eba5e07aaf 100644 --- a/src/init/features/dataconnect/sdk.ts +++ b/src/init/features/dataconnect/sdk.ts @@ -148,6 +148,12 @@ export async function chooseApp(): Promise { const pickedApps = await checkbox({ message: "Which apps do you want to set up Data Connect SDKs in?", choices, + validate: (choices) => { + if (choices.length === 0) { + return "Please choose at least one app."; + } + return true; + }, }); if (!pickedApps || !pickedApps.length) { throw new FirebaseError("Command Aborted. Please choose at least one app.");