Fix uninstall confirmation prompt
This commit is contained in:
+8
-2
@@ -30,8 +30,14 @@ confirm_uninstall() {
|
|||||||
echo " - Synapsis images pulled from GHCR/local cache"
|
echo " - Synapsis images pulled from GHCR/local cache"
|
||||||
echo " - ${INSTALL_DIR}"
|
echo " - ${INSTALL_DIR}"
|
||||||
echo ""
|
echo ""
|
||||||
printf "Type DELETE to continue: "
|
if [ -r /dev/tty ]; then
|
||||||
read -r confirmation
|
printf "Type DELETE to continue: " > /dev/tty
|
||||||
|
read -r confirmation < /dev/tty
|
||||||
|
else
|
||||||
|
echo "❌ Interactive confirmation requires a TTY." >&2
|
||||||
|
echo " Re-run with FORCE=1 if you want to skip the prompt." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$confirmation" != "DELETE" ]; then
|
if [ "$confirmation" != "DELETE" ]; then
|
||||||
echo "Aborted."
|
echo "Aborted."
|
||||||
|
|||||||
Reference in New Issue
Block a user