fix: handle non-interactive terminal in goose configure on Windows (#9214)

Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2026-05-14 13:25:43 -04:00
committed by GitHub
parent ffd2349b0e
commit 44b1e74bd6
2 changed files with 17 additions and 1 deletions
+9 -1
View File
@@ -310,7 +310,15 @@ if [ "$CONFIGURE" = true ]; then
echo ""
echo "Configuring goose"
echo ""
"$GOOSE_BIN_DIR/$OUT_FILE" configure
if [ -t 0 ]; then
"$GOOSE_BIN_DIR/$OUT_FILE" configure
elif [ -r /dev/tty ]; then
"$GOOSE_BIN_DIR/$OUT_FILE" configure < /dev/tty
else
echo "Non-interactive shell detected (e.g. 'curl ... | bash')."
echo "Skipping 'goose configure' — please run it manually after installation:"
echo " $GOOSE_BIN_DIR/$OUT_FILE configure"
fi
else
echo "Skipping 'goose configure', you may need to run this manually later"
fi