From fe2767c982c504814479f71856cf155662436c94 Mon Sep 17 00:00:00 2001
From: ansgarz <ansgar.zwick@meissa.de>
Date: Tue, 25 Feb 2025 20:49:02 +0100
Subject: [PATCH] [skip ci] fix installation opentofu

---
 .../provs/desktop/infrastructure/Opentofu.kt                | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Opentofu.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Opentofu.kt
index 2e2c055..94317b6 100644
--- a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Opentofu.kt
+++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Opentofu.kt
@@ -31,10 +31,10 @@ fun Prov.installOpentofu(
 
         cmd("sudo apt-get update -q=2")
         aptInstall("tofu")
-        if (!checkPackage("tofu")) {
-            ProvResult(false, err = "tofu not successfully installed")
+        if (checkPackage("tofu")) {
+            ProvResult(true, info = "Opentofu is installed.")
         } else {
-            ProvResult(false, info = "Opentofu is installed.")
+            ProvResult(false, err = "Opentofu not installed successfully.")
         }
     } else {
         ProvResult(false, err = "Opentofu could not be downloaded and installed.")