Need to use update pamac command twice because waiting for another package manager

Can you really trust yourself? pamac and pacman words kinda merge in my brain and easily get swapped around.

However, to get a warning you could do this:

/usr/local/bin/pamac

pamac
#!/bin/bash


if [[ $(ps -o comm= $PPID) == "sudo" ]]; then
    echo "Warning: Do not use 'pamac' with 'root' privileges. It can cause permission issues."
    read -p "Are you sure you want to continue? (y/n): " choice
    if [[ $choice != "y" ]]; then
        echo "Exiting..."
        exit 1
    else
        echo "Continuing..."
    fi
fi

/usr/bin/pamac "$@"

Create that file, and don’t forget to chmod +x