Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Defined Options ignored in composeWith #1316

Closed
armanrahman22 opened this issue Nov 15, 2021 · 1 comment
Closed

User Defined Options ignored in composeWith #1316

armanrahman22 opened this issue Nov 15, 2021 · 1 comment
Labels

Comments

@armanrahman22
Copy link

generator/lib/index.js

Lines 1223 to 1230 in 8633bb6

options = {
...options,
skipInstall: this.options.skipInstall,
skipCache: this.options.skipCache,
forceInstall: this.options.forceInstall,
skipLocalCache: this.options.skipLocalCache,
destinationRoot: this._destinationRoot
};

This block of code always overwrites the user-defined options passed in through the param. The spread operator should go after the default options like this:

options = { 
   skipInstall: this.options.skipInstall, 
   skipCache: this.options.skipCache, 
   forceInstall: this.options.forceInstall, 
   skipLocalCache: this.options.skipLocalCache, 
   destinationRoot: this._destinationRoot,
   ...options 
}; 
@github-actions
Copy link
Contributor

This issue is stale because it has been open with no activity. Remove stale label or comment or this will be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant