set -euo pipefail causes the script to exit when read gets EOF from the curl pipe instead of an interactive terminal. Fix by appending '< /dev/tty || CONFIRM=Y' so the prompt reads from the actual terminal regardless of how the script was invoked.
set -euo pipefail causes the script to exit when read gets EOF from the curl pipe instead of an interactive terminal. Fix by appending '< /dev/tty || CONFIRM=Y' so the prompt reads from the actual terminal regardless of how the script was invoked.