From b5ea8f2d5e10d791f26a0bc6eb904fa32dfa1f92 Mon Sep 17 00:00:00 2001 From: Robin Genz Date: Sun, 12 Jul 2026 13:39:16 +0200 Subject: [PATCH] fix: run deployment before `--json` output in `apps:builds:create` --- src/commands/apps/builds/create.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/commands/apps/builds/create.ts b/src/commands/apps/builds/create.ts index 4ae371c..4581fa4 100644 --- a/src/commands/apps/builds/create.ts +++ b/src/commands/apps/builds/create.ts @@ -480,6 +480,16 @@ export default defineCommand({ } } + // Create deployment if channel or destination is set + if (options.channel || options.destination) { + await ( + await import('@/commands/apps/deployments/create.js').then((mod) => mod.default) + ).action( + { appId, buildId: response.id, channel: options.channel, destination: options.destination }, + undefined, + ); + } + // Output JSON if json flag is set if (json) { console.log( @@ -513,13 +523,6 @@ export default defineCommand({ consola.success('Build started successfully.'); } } - - // Create deployment if channel or destination is set - if (options.channel || options.destination) { - await ( - await import('@/commands/apps/deployments/create.js').then((mod) => mod.default) - ).action({ appId, buildId: response.id, channel: options.channel, destination: options.destination }, undefined); - } }), });