From 8aa8768dcc4cd65b5283a2fe520aae233306155c Mon Sep 17 00:00:00 2001
From: Pavel Djundik <xPaw@users.noreply.github.com>
Date: Wed, 16 Oct 2019 17:07:25 +0300
Subject: [PATCH] Do not print no packages warning when opening help on client

---
 src/plugins/packages/index.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/plugins/packages/index.js b/src/plugins/packages/index.js
index f6d5ed6e..55825744 100644
--- a/src/plugins/packages/index.js
+++ b/src/plugins/packages/index.js
@@ -146,7 +146,11 @@ async function outdated(cacheTimeout = TIME_TO_LIVE) {
 
 	// Check if the configuration file exists
 	if (!fs.existsSync(packagesConfig)) {
-		log.warn("There are no packages installed.");
+		// CLI calls outdated with zero TTL, so we can print the warning there
+		if (!cacheTimeout) {
+			log.warn("There are no packages installed.");
+		}
+
 		return false;
 	}