Эх сурвалжийг харах

[multi-python] Fix is_supported_os to avoid bash -n error and ensure compatibility across OSes

Change-Id: I2e1f662eb6f432afeb62e69bed6956f2c60c0ad0
(cherry picked from commit 56db8a22fd3f3cd98371b3b77e603846ef54aedd)
agl29 7 сар өмнө
parent
commit
49c32c47c3

+ 5 - 1
tools/cloudera/build_hue_common.sh

@@ -11,8 +11,12 @@ big_console_header() {
 }
 
 is_supported_os() {
-  local -n _array=$1
+  local _arrayname=$1
   local _os=$2
+
+  local _array=()
+  eval "_array=(\"\${${_arrayname}[@]}\")"
+
   for item in "${_array[@]}"; do
     if [[ "$item" == "$_os" ]]; then
       return 0