-
Notifications
You must be signed in to change notification settings - Fork 343
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
Allow --start-url to accept a space separated list of URLs #797
Comments
If this is your first contribution, please refer to https://wiki.mozilla.org/Add-ons/Contribute/Code on how to get started. The mentor for this bug is: @kumar303 |
Hi @kumar303, Steven Gilbert here. Thank you for mentoring. Might I work on this issue? This would be my first patch. |
Hi @gilbertginsberg, definitely! Here is some info about how to get started: https://github.com/mozilla/web-ext/blob/master/CONTRIBUTING.md Let me know if you have questions. |
@kumar303: I switched the --start-url type from For context, I created a
I also tried different urls, and they worked too. But the When I made the change from I started going through the yarg docs for possible inspiration. Would I be going in the right direction there? Or is there another area of the codebase you might be able to point me to so I can investigate? Many thanks. |
Yep, you're going in the right direction. Also take a look at how we define the --ignore-files option and also how it gets used. |
Thanks @kumar303. So in And in And in The tests passed, but I still didn't get the expected behavior of Also I've played with this code block. Would that be a worthwhile place to continue investigating? Going forward I'll keep trying to better understand the codebase and yargs and trial-and-erroring. Hopefully with less errroring :P. And I need to spend some time getting better acquainted with Flow's syntax. I'll report back if any questions. |
The goal is definitely to get each URL sent as a separate arg to Firefox, like |
Roger that @kumar303. I'll continue the investigation. |
d'oh, this is not working. It looks like we're hitting a bug in yargs: yargs/yargs#821 @gilbertginsberg let's see if we can get a fix in yargs before doing a workaround. Because of the bug, |
Ah, okay okay. Sounds good, @kumar303. |
Hey @gilbertginsberg! How's it going with this bug? |
Hi @caitmuenster: I submitted a PR that served as a workaround, but that wasn't ideal. Instead it'd be best to fix the underlying bug in yargs yargs/yargs#821, which appears is not yet resolved. So I'm keeping an eye out on that fix before proceeding. |
Sounds good. Thanks for the update! |
@kumar303 Reading the context and the upstream issue I don't think it will be possible to fix yargs to take an array via an env var since env vars can only be strings - most shells don't seem to support exporting arrays. |
@kumar303 Given @muffinresearch's comment Is this issue still blocked by upstream? |
@muffinresearch I think it's possible because you can define the env var as a string with a space in it like this:
However, since this is blocked upstream it is no longer a good first bug. I removed the labels. |
I just double-checked if this issue or part of it was still valid, given that start-url has been changed to type string in in #1221 and #1707 fixed a regression on passing multiple urls over cli options (e.g. It looks that the environment variable can't be used to pass an array of values, but a config file like the following works:
A config file can be specified on the cli using the --config option, or through the Given that:
I'm closing this as fixed, because the original requests is already covered ( |
Is this a bug or feature request?
feature
What is the current behavior?
If you want to start Firefox with multiple tabs you can do so like this:
but you can only put one URL in the environment variable:
What is the expected or desired behavior?
You should be able to specify multiple URLs in the environment variable too, like this:
I think the only change needed for this is to switch the --start-url type from
string
toarray
like the --ignore-files option.Let's try to make it backwards compatible with multiple
--start-url
options if we can.The text was updated successfully, but these errors were encountered: