cordova-cli icon indicating copy to clipboard operation
cordova-cli copied to clipboard

Improve debug message when command returns 0

Open MarkMaldaba opened this issue 6 years ago • 1 comments

Feature Request

Motivation Behind Feature

The debug output* from the command-line build process (e.g. with the --verbose option) outputs the exit code of commands that are run. When the command fails you get output such as the following, which is as expected:

Command finished with error code 1: <details>

However, when the command indicates success with an exit code of zero, the following output is generated:

Command finished with error code 0: <details>

This is confusing, as this is not an error code, but a success code. It makes scanning for errors harder and implies that there has been a problem with the build.

(* note this may also affect normal output - I haven't checked.)

Feature Description

Expected output, for result code of zero only:

Command finished with success code 0: <details>

If it's problematic to vary the output depending on whether it returns a zero or not, an alternative wording for use in all cases would be:

Command finished with exit code 0: <details>

Either way, a change to the text to stop it implying that a success code is an error code would be very helpful.

MarkMaldaba avatar Mar 12 '19 10:03 MarkMaldaba

Good point. The line is logged here. I would appreciate a PR that changes the wording from error code to exit code

raphinesse avatar Apr 11 '19 19:04 raphinesse