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
pass on the -- flags to scripts #90
Comments
Not really sure what this issue is about, but I'm hoping it's related. I basically want to run |
Not currently, no. But yes, I believe that's what this issue was for. I can't remember exactly where this ended up, but I think the complexity was around how we know which flags are supposed to be passed to the script, and which are passed to bolt itself. i.e
The only is meant for bolt, the watch is meant for the script. |
That's why I like npm's approach more then yarn's. Because in npm it's clear which arguments belongs where :) |
How's that @d4rkr00t ? using an extra
|
Yeah i like |
Yea, I agree actually. If @jamiebuilds agrees, I could look at fixing that soon™? |
I put some examples of a related issue we ran into in #183. FWIW running a yarn command with
|
I noticed this command in the readme: I feel like that might cause confusion if we use the |
I'm a 👎🏻to using /bikeshed |
The only other way to do it then would be to have the order matter, and I think even with that, it would still cause problems for any tool that took any of the same flags we want to use (i.e meow would either only accept one, or possibly treat it as an array). Personally, I'd still be for the |
The algorithm I had in mind was to treat the first argument not starting with It means that you can't run commands that start with a |
Is there any movement on this issue? |
Soon™️ We've decided to go with the -- separator though, fyi. |
Any more updates on this? We're trying to move to Bolt for Confluence and we have a bunch of commands like this:
If we want to switch to Bolt I think as of today it'll mean duplicating the command just for the purpose of adding --watch to the end. Is that right? |
So, I've just started digging into this and have a much nicer idea that I think should work for the most use cases. So, if we look at all the ways you have of running commands right now you've got
and right now only one of those would let you pass flags in easily (the last one). As noted above, right now, yarn will actually pass all flags down to a script, so if you have
You can run The biggest issues with just passing all flags in that I could see was that we'd need to have a way of knowing which flags are meant for bolt and which were meant for the script being called. Well, looking deeper into this issue, that actually only really applies to
The only tricky one then is Obviously the biggest downside here would be that if the flag you wanted to pass down was one of those, you wouldnt be able to. So the alternative solution would be to make this the only command that uses the In code it's certainly less hacky to implement, and so I'm leaning towards that as a solution. I'll have a PR out today to try it out and spar it with a couple of people, but if anyone happens to see this, I'd love some inputs. |
this enable to pass options to scripts from cli 🙂
The text was updated successfully, but these errors were encountered: