From 5b10fbf364d9d79aca1d1c819000f53507b41771 Mon Sep 17 00:00:00 2001 From: v4n <105587619+v4n00@users.noreply.github.com> Date: Sat, 12 Jul 2025 12:36:12 +0300 Subject: [PATCH] fix: error when updating on steam deck (#72) --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 28809a9..5955f42 100755 --- a/install.sh +++ b/install.sh @@ -174,7 +174,7 @@ log INFO "Installing h2mm to ${ORANGE}$DESTINATION_PATH${NC}." # check if we need sudo based on destination path SUDO_CMD="" -if [[ ! -w "$DESTINATION_PATH" ]]; then +if [[ ! -w "$DESTINATION_PATH" || ( -f "$DESTINATION_PATH/h2mm" && ! -w "$DESTINATION_PATH/h2mm" ) ]]; then SUDO_CMD="sudo" log INFO "Destination path ${RED}requires${NC} elevated permissions, using sudo." fi