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 54fba73 commit e0e4841
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions open_spiel/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ MYDIR="$(dirname "$(realpath "$0")")"
function check_install_python() {
# 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-3.11
trap 'ret=0; output=$(brew list --versions | grep "python ${OS_PYTHON_VERSION}") || ret="$?"; trap - RETURN' RETURN
if [[ "$output" = "" ]]; then
brew install "python@${OS_PYTHON_VERSION}"
Expand Down

0 comments on commit e0e4841

Please sign in to comment.