From 1b17a049ff6dd238725182a5d995113ef57ba4e1 Mon Sep 17 00:00:00 2001 From: DavidHoenisch Date: Mon, 4 Aug 2025 22:03:42 -0700 Subject: [PATCH] improved error handling to exist on mistyped pin instead of failing silently --- bin/omarchy-setup-fido2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/omarchy-setup-fido2 b/bin/omarchy-setup-fido2 index 75b404b5..5c9161cd 100755 --- a/bin/omarchy-setup-fido2 +++ b/bin/omarchy-setup-fido2 @@ -18,6 +18,10 @@ else sudo mkdir -p /etc/fido2 echo -e "\e[32m\nLet's setup your device by confirming on the device now.\e[0m" pamu2fcfg >/tmp/fido2 # This needs to run as the user + if [ $? -ne 0 ]; then + echo -e "\e[31m\nSomething went wrong. Maybe try again?\e[0m" + exit 1 + fi sudo mv /tmp/fido2 /etc/fido2/fido2 fi