-
Notifications
You must be signed in to change notification settings - Fork 341
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
Execution of web-ext run
with chromium
defined as target in config file does not launch Chromium
#1862
Comments
web-ext run
with chromium
defined as target in config file does not launch Chromium
Could you share the config file that you've used for your test? And did you confirm that it was loaded (that will be shown in the command output)? |
It is simple module.exports = {
run: {
target: [
"firefox-desktop",
"chromium"
]
},
build: {
overwriteDest: true
}
}; Yes, it is shown in the command output
|
I suspected that the config was being overridden by the CLI parameters, and running web-ext in verbose mode does confirm that:
The "Favoring CLI" log is being logged by src/config.js: Lines 100 to 106 in de9211a
But the value from cli is actually the default value for that option: Lines 494 to 502 in de9211a
I verified that "removing the default value from the target cli option configuration" (linked above) does prevent this issue (well, to be precise it does "workaround the issue"), but the root cause is basically the same one behind #1327: the config file is being loaded after yargs has parsed the command line options and applied its own defaults. And so I think that a more proper way to fix this issue (as well as #1327) would be to make sure that:
|
For the record, #1327 is fixed in recently released 4.3.0 but this issue remains unresolved. |
#1327 was fixed by hooking on the validation logic, to defer the validation of required parameters until after reading from the config file. If we want to fix this bug in a similar way, then we would have to figure out if it is possible to delay the logic that sets the defaults. |
As a workaround for this issue (until we have been able to handle it with a more proper fix), package.json:
and all the rest of the cli options passed from the config file. |
Is this a feature request or a bug?
Bug
What is the current behavior?
Execution of
web-ext run
withchromium
defined as target in config file does not launch Chromium, whileweb-ext run --target chromium
works as expected.What is the expected or desired behavior?
Launch Chromium
Version information
The text was updated successfully, but these errors were encountered: