Skip to content

Commit

Permalink
Don't check compose twice on ethd update (eth-educators#1418)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne authored May 27, 2023
1 parent 822e11b commit 759ecf0
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions ethd
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,21 @@ determine_compose() {
else
__compose_exe="docker-compose"
__old_compose=1
__compose_version=$($__maybe_sudo docker-compose --version | sed -n -E -e "s/.*version [v]?([0-9.-]*).*/\1/ip")
echo
echo "You are using docker-compose ${__compose_version}, which is unsupported by Docker, Inc. from July 2023 on"
echo "eth-docker will stop supporting it with Dencun, sometime fall 2023."
echo ""
echo "It is recommended that you replace compose V1 with compose V2."
while true; do
read -rp "Do you want to update compose to V2? (yes/no) " yn
case $yn in
[Nn]* ) echo "Please be sure to update docker-compose yourself!"; break;;
* ) upgrade_compose; break;;
esac
done
if [ -z "${ETHDSECUNDO-}" ]; then # Don't run this twice
__compose_version=$($__maybe_sudo docker-compose --version | sed -n -E -e "s/.*version [v]?([0-9.-]*).*/\1/ip")
echo
echo "You are using docker-compose ${__compose_version}, which is unsupported by Docker, Inc. from July 2023 on"
echo "eth-docker will stop supporting it with Dencun, sometime fall 2023."
echo ""
echo "It is recommended that you replace compose V1 with compose V2."
while true; do
read -rp "Do you want to update compose to V2? (yes/no) " yn
case $yn in
[Nn]* ) echo "Please be sure to update docker-compose yourself!"; break;;
* ) upgrade_compose; break;;
esac
done
fi
fi

if [ -n "$__maybe_sudo" ]; then
Expand Down

0 comments on commit 759ecf0

Please sign in to comment.