From d59154ddf6b629ef62452e96593cfe3ef7f7fdb7 Mon Sep 17 00:00:00 2001 From: az Date: Thu, 20 Apr 2023 23:15:28 +0200 Subject: [PATCH] [skip ci] add task to remove snap firefox --- .../provs/desktop/infrastructure/Firefox.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Firefox.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Firefox.kt index 0ca35fb..e2c2a57 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Firefox.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Firefox.kt @@ -13,9 +13,12 @@ fun Prov.installFirefox() = task { // inspired by: https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04 - if (chk("snap list | grep firefox")) { - cmd("snap remove firefox", sudo = true) + task("remove snap firefox") { + if (chk("snap list | grep firefox")) { + cmd("snap remove firefox", sudo = true) + } } + aptInstall("software-properties-common") cmd("add-apt-repository -y ppa:mozillateam/ppa", sudo = true) @@ -35,4 +38,4 @@ fun Prov.installFirefox() = task { ) aptInstall("firefox") -} \ No newline at end of file +}