Skip to content

Commit

Permalink
fix: schema diff missing output
Browse files Browse the repository at this point in the history
fixes: #3031
  • Loading branch information
stuartwdouglas committed Oct 8, 2024
1 parent 39b081d commit 6ef412a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/cli/cmd_schema_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/TBD54566975/ftl/internal/projectconfig"
"github.com/TBD54566975/ftl/internal/rpc"
"github.com/TBD54566975/ftl/internal/schema"
"github.com/TBD54566975/ftl/internal/terminal"
"github.com/TBD54566975/ftl/internal/watch"
)

Expand Down Expand Up @@ -78,6 +79,9 @@ func (d *schemaDiffCmd) Run(ctx context.Context, currentURL *url.URL, projConfig

// Similar to the `diff` command, exit with 1 if there are differences.
if diff != "" {
// Unfortunately we need to close the terminal before exit to make sure the output is printed
// This is only applicable when we explicitly call os.Exit
terminal.FromContext(ctx).Close()
os.Exit(1)
}

Expand Down

0 comments on commit 6ef412a

Please sign in to comment.