Skip to content

Commit

Permalink
refactor(CLI): Reuse already imported module
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Jul 14, 2021
1 parent 3e58d62 commit be441cc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Serverless.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,8 @@ class Serverless {
configuration: this.configurationInput,
}
);
const resolveInput = require('./cli/resolve-input');
resolveInput.clear();
const { options, isHelpRequest } = resolveInput(commandsSchema);
resolveCliInput.clear();
const { options, isHelpRequest } = resolveCliInput(commandsSchema);
if (options.version) {
require('./cli/render-version')();
return;
Expand Down Expand Up @@ -347,7 +346,7 @@ class Serverless {
sls: require('./configuration/variables/sources/instance-dependent/get-sls')(this),
},
options: filterSupportedOptions(options, {
commandSchema: resolveInput.commandSchema,
commandSchema: resolveCliInput.commandSchema,
providerName,
}),
propertyPathsToResolve: isHelpRequest ? new Set(['plugins']) : null,
Expand Down

0 comments on commit be441cc

Please sign in to comment.