mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
refactor: Ensure that options are copied in Serverless constructor
This commit is contained in:
parent
d81730c219
commit
fd97e877ce
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user