summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Cuzella2023-10-12 14:34:41 -0600
committerParagoumba2023-12-19 18:53:54 +0100
commit6f07a87c753109cbd439f1fe23a9cce957940324 (patch)
treeb3f817268b0dd734ed5f7189d8b6a553e6f6aeee
parent948779d3512871e7f41716281327173b8451e0ff (diff)
downloadaur-6f07a87c753109cbd439f1fe23a9cce957940324.tar.gz
Fix user alpm hooks on pamac & polkit-auth pkg frontends
-rw-r--r--PKGBUILD4
-rw-r--r--vdhcoapp-user-install.hook2
-rw-r--r--vdhcoapp-user-remove.hook2
3 files changed, 4 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index af86b2b7cb39..d8ec00523b0e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -23,8 +23,8 @@ source=(https://github.com/aclap-dev/vdhcoapp/releases/download/v${pkgver}/vdhco
sha256sums=('6679e124d54224ac7b8403459c0d4a4dbb6709281cfd38c5c2c5200a3e43d726'
'a2b56e6ae3f7f8933e20762baa90e69f63f0802b2e6d213b51e0bc68843e5d27'
'3287859986d67e15e269965676bf9c75d1e853ea0ec97695811072fb8f10a7a8'
- 'a74a57aac6b2e76ded9524599d3047486f9f2d8f820c5114ad41209c8117ab35'
- 'fddf971ed2d6d976cd6ce34f9f04c9c2d18c03112eccda44ccf887cda0344b7c')
+ 'a08c02d934709cdea4392fce155bec0b33147e386ed154bed959c5b78788ea83'
+ 'f7406ae5ba7fb6602426ef97540f86e057a7fd6d01a917e5af3638f1d64b2ce9')
prepare() {
rm control.tar.xz
diff --git a/vdhcoapp-user-install.hook b/vdhcoapp-user-install.hook
index a9687896b01e..2afad2eda256 100644
--- a/vdhcoapp-user-install.hook
+++ b/vdhcoapp-user-install.hook
@@ -7,4 +7,4 @@ Target = vdhcoapp-bin
[Action]
Description = Installing JSON configuration file for current user ...
When = PostTransaction
-Exec = /bin/sh -c 'sudo -u $SUDO_USER /usr/bin/vdhcoapp install --user'
+Exec = /bin/sh -c 'sudo -u "${SUDO_USER:-$(id -u -n 1000 )}" /usr/bin/vdhcoapp install --user'
diff --git a/vdhcoapp-user-remove.hook b/vdhcoapp-user-remove.hook
index ac6e3fb286ce..c0f15dd8616e 100644
--- a/vdhcoapp-user-remove.hook
+++ b/vdhcoapp-user-remove.hook
@@ -6,4 +6,4 @@ Target = vdhcoapp-bin
[Action]
Description = Uninstalling JSON configuration file for current user ...
When = PreTransaction
-Exec = /bin/sh -c 'sudo -u $SUDO_USER /usr/bin/vdhcoapp uninstall --user'
+Exec = /bin/sh -c 'sudo -u "${SUDO_USER:-$(id -u -n 1000 )}" /usr/bin/vdhcoapp uninstall --user'