Skip to content

fix: run deployment before --json output in apps:builds:create#182

Merged
robingenz merged 1 commit into
mainfrom
fix/issue-180
Jul 12, 2026
Merged

fix: run deployment before --json output in apps:builds:create#182
robingenz merged 1 commit into
mainfrom
fix/issue-180

Conversation

@robingenz

Copy link
Copy Markdown
Member

In apps:builds:create, the deployment delegation (triggered by --channel or --destination) ran after the --json output block, so the delegated apps:deployments:create output landed on stdout after the JSON document. Consumers that parse the JSON tail of the command output received invalid input when --json was combined with --channel or --destination.

The deployment delegation now runs inside the wait-for-completion branch, after the share step and before the JSON output, so the JSON document is always the last thing written to stdout. Since --detached is already rejected in combination with --channel or --destination, the detached branch does not need the deployment block.

Close #180

Copilot AI review requested due to automatic review settings July 12, 2026 11:39
@robingenz robingenz self-assigned this Jul 12, 2026
@robingenz robingenz added the bug/fix Something isn't working label Jul 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes apps:builds:create output ordering so that when --json is used together with deployment delegation (--channel / --destination), the final JSON document remains the last content written to stdout, preventing downstream JSON parsers from receiving trailing non-JSON output.

Changes:

  • Moved the deployment delegation (apps:deployments:create) to run before the --json output block.
  • Scoped the deployment delegation to the “wait for completion” branch (where it can safely run after the build finishes and after the optional share step).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robingenz robingenz merged commit 1d693fb into main Jul 12, 2026
4 checks passed
@robingenz robingenz deleted the fix/issue-180 branch July 12, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug/fix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: --json output is corrupted when combined with --channel or --destination

2 participants