From a3c0f0babc1bce4eacc69d7b95f7ad22e6308df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Climent?= Date: Fri, 17 Jan 2025 14:06:21 +0100 Subject: [PATCH] Scoop: don't show success when internet drop and pwsh script crashes (fix #3186) --- .../Helpers/ScoopPkgOperationHelper.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/UniGetUI.PackageEngine.Managers.Scoop/Helpers/ScoopPkgOperationHelper.cs b/src/UniGetUI.PackageEngine.Managers.Scoop/Helpers/ScoopPkgOperationHelper.cs index fe2105c88..b97813282 100644 --- a/src/UniGetUI.PackageEngine.Managers.Scoop/Helpers/ScoopPkgOperationHelper.cs +++ b/src/UniGetUI.PackageEngine.Managers.Scoop/Helpers/ScoopPkgOperationHelper.cs @@ -85,12 +85,10 @@ protected override OperationVeredict _getOperationResult( return OperationVeredict.Failure; } - else - { - if (output_string.Contains("ERROR")) - return OperationVeredict.Failure; - return OperationVeredict.Success; - } + if (output_string.Contains("ERROR")) + return OperationVeredict.Failure; + + return returnCode == 0? OperationVeredict.Success: OperationVeredict.Failure; } }