Skip to content

Commit

Permalink
Use bash-style test for Fedora version
Browse files Browse the repository at this point in the history
Old-style test fails on Ubuntu when python3 enabled, with:

.../devstack/inc/python: line 52: [: 16.04: integer expression expected

Use bash-style test, which doesn't attempt to evaluate the RHS if the
LHS evaluates to false

Change-Id: If18031ab98c9060e5825c3a8d3c647bd3705cd9c
Closes-Bug: #1796174
  • Loading branch information
imacdonn committed Oct 4, 2018
1 parent bb99f1f commit e991f7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/python
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function get_python_exec_prefix {
fi
$xtrace

if python3_enabled && [ "$os_VENDOR" = "Fedora" -a $os_RELEASE -gt 26 ]; then
if python3_enabled && [[ "$os_VENDOR" == "Fedora" && $os_RELEASE -gt 26 ]]; then
# Default Python 3 install prefix changed to /usr/local in Fedora 27:
# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
echo "/usr/local/bin"
Expand Down

0 comments on commit e991f7d

Please sign in to comment.