Skip to content

Commit

Permalink
Use zsh_version to determine how to read
Browse files Browse the repository at this point in the history
  • Loading branch information
andreilitvin committed Jun 20, 2023
1 parent 4fcfa39 commit 98ef8be
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/setup/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ _install_additional_pip_requirements() {
done

if ! [ -z "$_SETUP_PLATFORM" ]; then
_PLATFORMS="${_SETUP_PLATFORM/,/ }"
for platform in ${_PLATFORMS}; do
if ! [ -z "$ZSH_VERSION" ]; then
IFS="," read -r -A _PLATFORMS <<<"$_SETUP_PLATFORM"
else
IFS="," read -r -a _PLATFORMS <<<"$_SETUP_PLATFORM"
fi
for platform in "${_PLATFORMS[@]}"; do
# Allow none as an alias of nothing extra installed (like -p none)
if [ "$platform" != "none" ]; then
echo "Installing pip requirements for $platform..."
Expand All @@ -43,10 +47,7 @@ _install_additional_pip_requirements() {
-c "$_CHIP_ROOT/scripts/setup/constraints.txt"
fi
done
unset _PLATFORMS
fi

unset _SETUP_PLATFORM
}

_bootstrap_or_activate() {
Expand Down

0 comments on commit 98ef8be

Please sign in to comment.