Skip to content

Commit 85ff141

Browse files
committed
gh-120291: Fix a bashism in python-config.sh.in
Replace the use of bash-specific `[[ ... ]]` with POSIX-compliant `[ ... ]` to make the `python-config` shell script work with non-bash shells again. Fixes #120291
1 parent 34f5ae6 commit 85ff141

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix the shell version of ``python-config`` script to work with non-bash
2+
shells.

Misc/python-config.sh.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
exit_with_usage ()
66
{
77
local USAGE="Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir|--embed"
8-
if [[ "$1" -eq 0 ]]; then
8+
if [ "$1" -eq 0 ]; then
99
echo "$USAGE"
1010
else
1111
echo "$USAGE" >&2

0 commit comments

Comments
 (0)