mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-45101: Add consistency in usage message IO between 2 versions of python-config (GH-28162)
On --help output to stdout. On error output to stderr.
This commit is contained in:
parent
da382aaf52
commit
de2a73dc46
3 changed files with 9 additions and 2 deletions
|
|
@ -4,7 +4,12 @@
|
|||
|
||||
exit_with_usage ()
|
||||
{
|
||||
echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir|--embed"
|
||||
local USAGE="Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir|--embed"
|
||||
if [[ "$1" -eq 0 ]]; then
|
||||
echo "$USAGE"
|
||||
else
|
||||
echo "$USAGE" >&2
|
||||
fi
|
||||
exit $1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue