From ff5cdc30193ba69944f6772f213e63ea00678861 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 26 Aug 2020 09:23:56 +0200 Subject: [ ... print count-only ...] -> [ :len [ ... find ... ] ] Using 'print count-only' always prints a number to terminal, even if the value is evaluated in a condition or assigned to a variable. This can be quite annoying. Behavior will not chance (SUP-25503), so replacing the code... --- capsman-download-packages | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'capsman-download-packages') diff --git a/capsman-download-packages b/capsman-download-packages index 88aac0e..a314163 100644 --- a/capsman-download-packages +++ b/capsman-download-packages @@ -21,7 +21,7 @@ $WaitFullyConnected; :local InstalledVersion [ / system package update get installed-version ]; :local Updated false; -:if ([ / file print count-only where name=$PackagePath type="directory" ] = 0) do={ +:if ([ :len [ / file find where name=$PackagePath type="directory" ] ] = 0) do={ $MkDir $PackagePath; $LogPrintExit info ("Created directory at package path (" . $PackagePath . \ "). Please place your packages!") false; @@ -43,7 +43,7 @@ $WaitFullyConnected; } :if ($Updated = true) do={ - :if ([ / system script print count-only where name="capsman-rolling-upgrade" ] > 0) do={ + :if ([ :len [ / system script find where name="capsman-rolling-upgrade" ] ] > 0) do={ / system script run capsman-rolling-upgrade; } else={ / caps-man remote-cap upgrade [ find where version!=$InstalledVersion ]; -- cgit v1.2.3-54-g00ecf