From f988e13188ed0bcb1d831d2a9dfd89187c3959ad Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" Date: Mon, 11 Mar 2024 14:31:54 +0530 Subject: [PATCH] =?UTF-8?q?@eshanized=20pushed=20another=20commit=20via=20?= =?UTF-8?q?script=20=F0=9F=94=A5=F0=9F=94=A5=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/snigdhaos-updater/core-script | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/snigdhaos-updater/core-script b/common/snigdhaos-updater/core-script index 84f658a4..8ad98e8b 100644 --- a/common/snigdhaos-updater/core-script +++ b/common/snigdhaos-updater/core-script @@ -167,3 +167,9 @@ while true; do esac done +if grep -qE 'subvol=@/.snapshots/[0-9]+/snapshot' /proc/cmdline && [[ ! -v GARUDA_SNAPSHOT_PACMAN ]]; then + echo -e "\033[0;31mError: You are currently booted into a snapshot. Please restore the snapshot via btrfs-assistant or snapper-tools before updating your system.\n\033[0;34mNote: You can ignore this error by setting SNIGDHAOS_SNAPSHOT_PACMAN: SNIGDHAOS_SNAPSHOT_PACMAN=1 snigdhaos-updater\n\033[1;31mAny modifications made to this snapshot will be lost next reboot. ❌\033[0m" + exit 1 +fi + +init_logging