Wait for Docker.app to appear before opening after install

This commit is contained in:
cediackermann 2026-04-24 10:55:43 +02:00
parent 93d3f67180
commit fdab99ac79

View file

@ -16,13 +16,19 @@ install_docker() {
softwareupdate --install-rosetta --agree-to-license softwareupdate --install-rosetta --agree-to-license
print_success "Rosetta 2 ready" print_success "Rosetta 2 ready"
print_warning "Opening Docker Desktop..." print_warning "Waiting for Docker.app to appear in /Applications..."
if [ -d "/Applications/Docker.app" ]; then local WAIT=0
open -a Docker while [ ! -d "/Applications/Docker.app" ]; do
else if [ $WAIT -ge 30 ]; then
print_error "Docker.app not found in /Applications. Please install Docker Desktop manually." print_error "Docker.app not found in /Applications after 30s. Please install Docker Desktop manually."
exit 1 exit 1
fi fi
sleep 2
WAIT=$((WAIT + 2))
done
print_warning "Opening Docker Desktop..."
open -a Docker
echo "" echo ""
echo "MANUAL STEP REQUIRED:" echo "MANUAL STEP REQUIRED:"