Created
July 13, 2023 06:46
-
-
Save FLX-0x00/e755c530fa77031f80139a0e5af57a58 to your computer and use it in GitHub Desktop.
pacman / paru custom hook for upgrading pipx packages after system upgrade using current user context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Trigger] | |
Operation = Upgrade | |
Type = Package | |
Target = * | |
[Action] | |
Description = Upgrading pipx packages... | |
When = PostTransaction | |
Exec = /bin/bash -c 'export SUDO_USER=$(/usr/bin/env | grep -oP "^SUDO_USER=\K.*") && /usr/bin/sudo -u $SUDO_USER pipx upgrade-all' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment