fix: web-deploy validation to check for frontend flag

This commit is contained in:
Aman Varshney
2025-07-09 22:53:13 +05:30
parent cfc4f000bd
commit 5fec00a48f
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"create-better-t-stack": patch
---
fix: web-deploy validation to check for frontend flag

View File

@@ -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'.",
);