diff --git a/lib/Serverless.js b/lib/Serverless.js index 679c98069..ef0f66058 100644 --- a/lib/Serverless.js +++ b/lib/Serverless.js @@ -87,7 +87,10 @@ class Serverless { this._shouldReportMissingServiceDeprecation = true; } const commands = ensureArray(configObject.commands, { isOptional: true }); - const options = ensurePlainObject(configObject.options, { isOptional: true }); + let options = ensurePlainObject(configObject.options, { isOptional: true }); + // This is a temporary workaround to ensure that original `options` are not mutated + // Should be removed after addressing: https://github.com/serverless/serverless/issues/2582 + if (options) options = { ...options }; if (!commands || !options) { this._shouldReportCommandsDeprecation = true; this.processedInput = resolveCliInput();