Skip to content

Commit 49c32c4

Browse files
committed
[multi-python] Fix is_supported_os to avoid bash -n error and ensure compatibility across OSes
Change-Id: I2e1f662eb6f432afeb62e69bed6956f2c60c0ad0 (cherry picked from commit 56db8a22fd3f3cd98371b3b77e603846ef54aedd)
1 parent 986ebe0 commit 49c32c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/cloudera/build_hue_common.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ big_console_header() {
1111
}
1212

1313
is_supported_os() {
14-
local -n _array=$1
14+
local _arrayname=$1
1515
local _os=$2
16+
17+
local _array=()
18+
eval "_array=(\"\${${_arrayname}[@]}\")"
19+
1620
for item in "${_array[@]}"; do
1721
if [[ "$item" == "$_os" ]]; then
1822
return 0

0 commit comments

Comments
 (0)