From ae5be0f5dafaad933000e98142fcb1ec60e04555 Mon Sep 17 00:00:00 2001 From: Piotr Grzesik Date: Tue, 29 Jun 2021 17:50:27 +0200 Subject: [PATCH] fix(CLI Onboarding): Do not attempt local fallback during onboarding --- lib/cli/interactive-setup/deploy.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/cli/interactive-setup/deploy.js b/lib/cli/interactive-setup/deploy.js index f812b0cb39d..72359130079 100644 --- a/lib/cli/interactive-setup/deploy.js +++ b/lib/cli/interactive-setup/deploy.js @@ -166,8 +166,14 @@ module.exports = { await overrideStdoutWrite( () => {}, async (originalStdWrite) => { + // This is a hack to disable local fallback for interactive setup + // After https://github.com/serverless/serverless/issues/1720 is addressed + // We can change the approach to deployment in interactive setup and remove this hack + serverless.isLocallyInstalled = true; await serverless.init(); interactiveOutputPlugin = configurePlugin(serverless, originalStdWrite); + // Remove previously set `isLocallyInstalled` as it was only needed to avoid local fallback in `init()` + delete serverless.isLocallyInstalled; await serverless.run(); } );