-
Notifications
You must be signed in to change notification settings - Fork 302
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
Don't overwrite all options previously specified when manifest is found (assign re-defined only) #1263
Conversation
@@ -43,11 +43,15 @@ async function nwbuild(options) { | |||
|
|||
try { | |||
// Parse options | |||
options = await util.parse(options, manifest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember why I did this. If options.srcDir or options.glob is undefined, then getNodeManifest function will throw an error. This is why the parse function is called twice. If there's a better way to go about this, I'm all ears
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Black-Platypus ping
Also nothing should be overwritten. If an option is undefined, the default value is used for it. If an option is being overwritten, then its probably an error in the parse function. |
63aa95b
to
eec849e
Compare
…nd (assign re-defined only)
eec849e
to
5d59701
Compare
This completely overwrites Line 50 in ef120b2
|
The options defined in a package.json (NW.js manifest) overwrite options defined in JavaScript API or CLI. The highlighted code checks if the options are defined in package.json. This is a feature not bug. |
Alright, sad to hear this won't be implemented. |
I'm not against this but it would be a breaking change. Also having a priority makes it easier to maintain in the long term |
Keep anything the user specified in the
options
object and only overwrite things found in any manifest (package.json) found.manifest.app
tooptions.app
manifest
tooptions
options.app
Fixes: #1261