Skip to content

Commit dae166c

Browse files
committed
fix
1 parent 5858d19 commit dae166c

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

deploy/create/mod.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ export const createCommand = new Command<GlobalContext>()
5757
"--app-directory <path:string>",
5858
"The path to the application directory",
5959
)
60-
.option("--use-detected-build-config", "Use detected build configuration")
60+
.option(
61+
"--do-not-use-detected-build-config",
62+
"Do not use the detected build configuration",
63+
)
6164
.option("--framework-preset <preset:string>", "The framework preset to use", {
6265
value(value: string) {
6366
if (SUPPORTED_FRAMEWORK_PRESETS.has(value as FrameworkPreset)) {
@@ -238,15 +241,7 @@ export const createCommand = new Command<GlobalContext>()
238241
}
239242

240243
let buildConfig;
241-
if (options.useDetectedBuildConfig) {
242-
if (member?.buildConfig) {
243-
buildConfig = member?.buildConfig;
244-
} else {
245-
throw new TypeError(
246-
`No build configuration was detected in '${buildDirectory}'.`,
247-
);
248-
}
249-
} else {
244+
if (options.doNotUseDetectedBuildConfig) {
250245
const base = {
251246
frameworkPreset: options.frameworkPreset ?? "" as FrameworkPreset,
252247
installCommand: requireUnless(
@@ -297,6 +292,14 @@ export const createCommand = new Command<GlobalContext>()
297292
break;
298293
}
299294
}
295+
} else {
296+
if (member?.buildConfig) {
297+
buildConfig = member?.buildConfig;
298+
} else {
299+
throw new TypeError(
300+
`No build configuration was detected in '${buildDirectory}'.`,
301+
);
302+
}
300303
}
301304

302305
const buildTimeout = require(options.buildTimeout, "build-timeout");

0 commit comments

Comments
 (0)