-
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
Environment variables get applied as options to any command #793
Comments
oof, good catch. I'm pretty sure this has existed ever since #226 but no one else noticed. It's because those env variables are only recognized by the |
This make environment variable totally unusable... and it seems that web-ext use yargs to parse env variable (https://github.com/mozilla/web-ext/blob/master/src/program.js#L88). Should we move this to yargs or any other ideas to fix this? |
Oops, I should have filed an upstream bug originally. Here it is: yargs/yargs#873 |
This reverts commit 0b3040a. Until mozilla/web-ext#793 is fixed
Any updates here? I just killed over an hour trying to figure this out. Hack I'm using to work-around this for now: APIKEY="$WEB_EXT_API_KEY"
APISECRET="$WEB_EXT_API_SECRET"
unset WEB_EXT_API_KEY
unset WEB_EXT_API_SECRET
# Zip the Firefox extension.
npx web-ext build --config-discovery=false
# Zip+sign (XPI) the Firefox extension.
npx web-ext sign \
--api-key=$APIKEY \
--api-secret=$APISECRET \
--config-discovery=false |
I'm creating these archives on CI and want to use environment variables rather than having to worry about creating a config file. Do you have an estimate as to when the |
Not soon, unfortunately. I ran in multiple issues when I tried to upgrade and have other higher pressing tasks that I need to work on. |
OK, fair enough. Perhaps adding something to the README and/or https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/web-ext_command_reference would suffice for now? |
wow, middle of 2019 and still not fixed |
One of build_and_test's commands is `npm run xpi`, which eventually runs `web-ext build`. Because the `WEB_EXT_API_SECRET` and `WEB_EXT_API_KEY` environment variables are currently set in CircleCI's secret environment variables, the build breaks because `web-ext build` fails to run when these are set: mozilla/web-ext#793 As a work-around, unset those env vars before running `web-ext build`.
One of build_and_test's commands is `npm run xpi`, which eventually runs `web-ext build`. Because the `WEB_EXT_API_SECRET` and `WEB_EXT_API_KEY` environment variables are currently set in CircleCI's secret environment variables, the build breaks because `web-ext build` fails to run when these are set: mozilla/web-ext#793 As a work-around, unset those env vars before running `web-ext build`.
One of build_and_test's commands is `npm run xpi`, which eventually runs `web-ext build`. Because the `WEB_EXT_API_SECRET` and `WEB_EXT_API_KEY` environment variables are currently set in CircleCI's secret environment variables, the build breaks because `web-ext build` fails to run when these are set: mozilla/web-ext#793 As a work-around, unset those env vars before running `web-ext build`.
Just ran into this as well. |
Yea this is very annoying. It's a shame this issue doesn't get any attention. It feels as if the developers aren't even using the environmental variables credentials feature so that's why it doesn't bother them. |
Is this a bug or feature request?
This is a bug.
What is the current behavior?
I have set
WEB_EXT_API_KEY
andWEB_EXT_API_SECRET
in my~/.bash_profile
.Running
web-ext build
for any webextension project fails with the following error:Unknown arguments: apiSecret, apiKey
When I remove the two environment variables,
web-ext
works fine.What is the expected or desired behavior?
web-ext build
(and other commands) should ignore environment variables they don't need.Version information (for bug reports)
v7.5.0
4.1.2
1.6.0
The text was updated successfully, but these errors were encountered: