From a17d63e1a513b09bdfb6d5dbeebc4f5824226378 Mon Sep 17 00:00:00 2001 From: az Date: Wed, 31 Aug 2022 19:11:20 +0200 Subject: [PATCH] make enableGopassWrapperShForFirefox working not only for local execution --- .../provs/desktop/infrastructure/GopassBridge.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GopassBridge.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GopassBridge.kt index 396fb26..7d3200b 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GopassBridge.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GopassBridge.kt @@ -70,12 +70,12 @@ fun Prov.installGopassBridgeJsonApi() = task { fun Prov.enableGopassWrapperShForFirefox() = task { - val appArmorFile = File("/etc/apparmor.d/usr.bin.firefox") + val appArmorFile = "/etc/apparmor.d/usr.bin.firefox" - if (appArmorFile.exists()) { + if (checkFile(appArmorFile)) { addTextToFile( - "owner @{HOME}/.config/gopass/gopass_wrapper.sh ux", - appArmorFile, + "\nowner @{HOME}/.config/gopass/gopass_wrapper.sh ux\n", + File(appArmorFile), sudo = true ) }