From 5a2da444ea5f896f56cf03e509631d2df548457c Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 17 Mar 2021 15:07:14 +0100 Subject: [PATCH] feat(Variables): Disallow `provider.variableSyntax` with new resolver --- scripts/serverless.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/serverless.js b/scripts/serverless.js index 6632f45f9..cb84716f7 100755 --- a/scripts/serverless.js +++ b/scripts/serverless.js @@ -95,6 +95,14 @@ const processSpanPromise = (async () => { await (async () => { if (_.get(configuration.provider, 'variableSyntax')) { if (isHelpRequest) return; + if (configuration.variablesResolutionMode) { + throw new ServerlessError( + `Cannot resolve ${path.basename( + configurationPath + )}: "variableSyntax" is not supported with new variables resolver. ` + + 'Please drop this setting' + ); + } logDeprecation( 'NEW_VARIABLES_RESOLVER', 'Serverless Framework was enhanced with a new variables resolver ' +