forked from cross-rs/cross
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds the quiet and color command-line flags, where color supports `auto`, always`, and `never`. These command-line flags are parsed to a verbosity which can be quiet, normal, or verbose. With these, we then have the stderr message formatters: - `fatal_usage`: print a fatal error message with the failing argument, and add a help context menu for how to use cross. - `fatal`: print red 'error' message and exit with an error code - `error`: print red 'error' message - `warn`: print amber 'warning' message - `note`: print cyan 'note' message - `status`: print an uncolored and unprefixed 'status' message We have the stdout message formatters: - `print`: always print the message - `info`: print the message as long as the verbosity is not quiet - `debug`: only print the message if the output is not quiet We also have a few specialized error handlers, and methods to help ensure we can have flexible error reporting in the future: - `status_stderr` - `status_stdout` The command extensions now have, `print`, `info`, and `debug`, which formats the command and sends it to the shell. This allows us to avoid using `print_verbose` where we sometimes manually override the default setting. Closes cross-rs#797.
- Loading branch information
1 parent
40d6cd4
commit 837b095
Showing
32 changed files
with
1,230 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.