apache / apache/cordova-cli

Improve debug message when command returns 0

Open
#412 1 comment 6 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
967
Forks
344
Avg merge
8h 41m
Merged PRs (30d)
9

Description

# 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:
````

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

````
Command finished with error code 0:
````

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:
````

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:
````

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

Contributor guide

Open the contributing guide

Research direction

Start at the command-line build process, especially the output produced with --verbose, and locate where command completion messages are formatted. Check whether normal output uses the same path; done means successful commands no longer describe exit code 0 as an error while failure output remains clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.