Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
lanctot authored Dec 5, 2024
1 parent e009219 commit 969b22b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions open_spiel/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ function ci_check_install_python() {
fi

# Need the trap here to make sure the return value of grep being 1 doesn't cause set -e to fail
# https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap
rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION}
rm -f /usr/local/bin/idle${OS_PYTHON_VERSION}
rm -f /usr/local/bin/pydoc${OS_PYTHON_VERSION}
rm -f /usr/local/bin/python${OS_PYTHON_VERSION}
rm -f /usr/local/bin/python${OS_PYTHON_VERSION}*
# https://stackoverflow.com/questions/77047127/bash-capture-stderr-of-a-function-while-using-trap
trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN
if [[ "$output" = "" ]]; then
# The --force is needed because there seems to be a phantom installation in /usr/local/
Expand Down

0 comments on commit 969b22b

Please sign in to comment.