From bbd8b27fc7b0e8bbcdc000744638d9a5ff768b6a Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 8 Apr 2019 11:14:43 -0500 Subject: [PATCH] Explicitly mention if netstat isn't installed; downgrade to warning --- packages/server/src/portScanner.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/server/src/portScanner.ts b/packages/server/src/portScanner.ts index b5c36bf9..da0be629 100644 --- a/packages/server/src/portScanner.ts +++ b/packages/server/src/portScanner.ts @@ -79,7 +79,11 @@ export const createPortScanner = (scanInterval: number = 5000): PortScanner => { logger.trace("scanning ports"); scan((error) => { if (error) { - logger.error(`Port scanning will not be available: ${error.message}.`); + if ((error as NodeJS.ErrnoException).code === "ENOENT") { + logger.warn("Port scanning will not be available because netstat is not installed"); + } else { + logger.warn(`Port scanning will not be available: ${error.message}`); + } disposed = true; } else if (!disposed) { lastTimeout = setTimeout(doInterval, scanInterval);