Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

The CLI should not report IO messages when the --json flag is passed#2731

Merged
karreiro merged 3 commits intomainfrom
fix-1377-2
Feb 20, 2023
Merged

The CLI should not report IO messages when the --json flag is passed#2731
karreiro merged 3 commits intomainfrom
fix-1377-2

Conversation

@karreiro
Copy link
Contributor

@karreiro karreiro commented Feb 17, 2023

WHY are these changes introduced?

Backport Shopify/cli#1379

Update checklist

  • I've added a CHANGELOG entry for this PR (if the change is public-facing)

@karreiro karreiro requested review from a team, Poitrin, isaacroldan and matteodepalo and removed request for a team, isaacroldan and matteodepalo February 17, 2023 15:37

def report(message)
ctx.puts(message) if @enabled
ctx.error(message) if @enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also change the doc? Doc says standard output. Do we want log and report to be separate methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! 🚀 I've updated the doc. Also, regarding the report method, reporters (we have more than one) are utility classes used by the Syncer, so it can control when status messages are reported and when they are ignored (with that in mind, I personally would keep the report method).

@karreiro karreiro merged commit 79c988b into main Feb 20, 2023
@karreiro karreiro deleted the fix-1377-2 branch February 20, 2023 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants