From b4e4fdac71bedbc99a19a37b265ea1d8b17dd1c9 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Mon, 27 Sep 2021 17:38:07 +0200 Subject: [PATCH] refactor: Use set instead of array --- scripts/serverless.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/serverless.js b/scripts/serverless.js index 46095e6f0..c3f12a891 100755 --- a/scripts/serverless.js +++ b/scripts/serverless.js @@ -41,7 +41,7 @@ let hasTelemetryBeenReported = false; // to propery handle e.g. `SIGINT` interrupt const keepAliveTimer = setTimeout(() => {}, 60 * 60 * 1000); -const standaloneCommands = ['plugin install']; +const standaloneCommands = new Set(['plugin install']); process.once('uncaughtException', (error) => { clearTimeout(keepAliveTimer); @@ -507,7 +507,7 @@ const processSpanPromise = (async () => { const configurationFilename = configuration && configurationPath.slice(serviceDir.length + 1); - const isStandaloneCommand = standaloneCommands.includes(command); + const isStandaloneCommand = standaloneCommands.has(command); if (isInteractiveSetup || isStandaloneCommand) { if (isInteractiveSetup) {