Skip to content

Commit f092a9b

Browse files
committed
fix(cli): clearer flag conflicts and more headroom on the deploy settings fetch
Conflicts now name --native-build instead of the hidden alias, and --depot-build conflicts with --detach up front. The deploy settings timeout is 5s (still a single attempt): the endpoint answers in ~350ms but TCP connect stalls of over a second were observed, and a spurious timeout would silently move a deploy to Depot.
1 parent b190c54 commit f092a9b

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

packages/cli-v3/src/commands/deploy.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,14 @@ export function configureDeployCommand(program: Command) {
226226
.implies({
227227
localBuild: true,
228228
})
229-
.conflicts("nativeBuildServer")
229+
.conflicts(["nativeBuild", "nativeBuildServer"])
230230
.hideHelp()
231231
)
232232
.addOption(
233-
new CommandOption("--local-build", "Build the deployment image locally").conflicts(
234-
"nativeBuildServer"
235-
)
233+
new CommandOption("--local-build", "Build the deployment image locally").conflicts([
234+
"nativeBuild",
235+
"nativeBuildServer",
236+
])
236237
)
237238
.addOption(new CommandOption("--push", "Push the image after local builds").hideHelp())
238239
.addOption(
@@ -264,11 +265,13 @@ export function configureDeployCommand(program: Command) {
264265
"--depot-build",
265266
"Build the image with Depot, ignoring the build path configured for this project on the server"
266267
).conflicts([
268+
"nativeBuild",
267269
"nativeBuildServer",
268270
"localBundle",
269271
"localBuild",
270272
"forceLocalBuild",
271273
"fromBundle",
274+
"detach",
272275
])
273276
)
274277
.addOption(
@@ -1266,7 +1269,7 @@ function getTriggeredVia(): DeploymentTriggeredVia {
12661269
return "cli:manual";
12671270
}
12681271

1269-
const DEPLOY_SETTINGS_TIMEOUT_MS = 3_000;
1272+
const DEPLOY_SETTINGS_TIMEOUT_MS = 5_000;
12701273

12711274
const BUILD_PATH_LABEL: Record<DeployBuildPath, string> = {
12721275
depot: "Depot",

0 commit comments

Comments
 (0)