sfdx-git-delta icon indicating copy to clipboard operation
sfdx-git-delta copied to clipboard

Clean output if json parameter is not set

Open gavignon opened this issue 3 years ago • 4 comments

Clean output if json parameter is not set

Remove json output if --json parameter is not set, use spinner instead.

What is the current result ?

sfdx sgd:source:delta -s force-app -f <FROM> -t <TO> -o <OUTPUT> Result: { "error": null, "output": "<OUTPUT>", "success": true, "warnings": [] }


What are the expected results ?

  1. Without JSON parameter: sfdx sgd:source:delta -s force-app -f <FROM> -t <TO> -o <OUTPUT> Result: Generating delta...done or nothing

  2. With JSON parameter sfdx sgd:source:delta -s force-app -f <FROM> -t <TO> -o <OUTPUT> --json Result: { "error": null, "output": "<OUTPUT>", "success": true, "warnings": [] }

gavignon avatar Nov 02 '22 13:11 gavignon

Thanks @gavignon !

We'll look into it, it may introduce breaking changes but it will be closer to the standard behavior

scolladon avatar Nov 02 '22 13:11 scolladon

I agree that we were to launch the plugin today we should have implemented the behaviour described by @gavignon .

But since SGD is already heavily used, I have mixed feeling about introducing a breaking change.

@gavignon are you facing an issue that would be solved by this change? Or did you log this issue simply to recommend that SGD should follow the "usual" behaviour of the other sfdx commands?

mehdicherf avatar Nov 03 '22 09:11 mehdicherf

Thanks for the quick feedback @mehdisfdc @scolladon !

This is not a show stopper, I would like this enhancement to increase the readability in the jobs, as this output is not needed. To avoid introducing breaking changes, maybe this can be done through a new parameter "--silent" ?

gavignon avatar Nov 03 '22 10:11 gavignon

I like the idea of a new --silent flag

mehdicherf avatar Nov 03 '22 16:11 mehdicherf