Closed fxsalazar closed 6 months ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
👀 any news for this PR?
@riderx can it be possible to at least avoid printing the checkLatest when using --json
Sorry it seems i closed wrongly, i check it again
hey @fxsalazar i'm not sure to understand why create a logger class for just one usage different form printing ? why not calling your function at the only place it's required?
Thanks a lot for trying, I just made a solution i was finding simpler: https://github.com/Cap-go/CLI/commit/540363461a6d2410e8e3130d70a0b0def2186c9f
For abstraction; instead of checking everywhere you wan to print if (!json)
, let the Logger handle how to do the logging.
This option is only available in one place, and if the message is not print there is no need to call checkLatest
so i went the simple way and add one more if instead :)
Abstraction of the json logs.
My motivation was to avoid printing the
checkLatest
warning when --json