From 5fec00a48f31501b9c7bea0e6ad205c6eaa83c31 Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Wed, 9 Jul 2025 22:53:13 +0530 Subject: [PATCH] fix: web-deploy validation to check for frontend flag --- .changeset/mighty-rats-lie.md | 5 +++++ apps/cli/src/validation.ts | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/mighty-rats-lie.md diff --git a/.changeset/mighty-rats-lie.md b/.changeset/mighty-rats-lie.md new file mode 100644 index 0000000..3f6cc5d --- /dev/null +++ b/.changeset/mighty-rats-lie.md @@ -0,0 +1,5 @@ +--- +"create-better-t-stack": patch +--- + +fix: web-deploy validation to check for frontend flag diff --git a/apps/cli/src/validation.ts b/apps/cli/src/validation.ts index 85448c3..e2b31be 100644 --- a/apps/cli/src/validation.ts +++ b/apps/cli/src/validation.ts @@ -448,7 +448,13 @@ export function processAndValidateFlags( const hasWebFrontendFlag = (config.frontend ?? []).some((f) => WEB_FRAMEWORKS.includes(f), ); - if (config.webDeploy && config.webDeploy !== "none" && !hasWebFrontendFlag) { + + if ( + config.webDeploy && + config.webDeploy !== "none" && + !hasWebFrontendFlag && + providedFlags.has("frontend") + ) { consola.fatal( "'--web-deploy' requires a web frontend. Please select a web frontend or set '--web-deploy none'.", );