fix: error when updating on steam deck (#72)

This commit is contained in:
v4n
2025-07-12 12:36:12 +03:00
committed by GitHub
parent 1f2a34dc5b
commit 5b10fbf364
+1 -1
View File
@@ -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