Skip to content
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

Allowing both piping and quotes in bulker run #74

Open
nsheff opened this issue Jan 15, 2021 · 1 comment
Open

Allowing both piping and quotes in bulker run #74

nsheff opened this issue Jan 15, 2021 · 1 comment
Labels
brainstorming enhancement New feature or request

Comments

@nsheff
Copy link
Member

nsheff commented Jan 15, 2021

How can I pipe something to bulker run?

In bulker v 0.5.0 you could do:

bulker run pi,demo "pi | cowsay"

And this is even shown in the demo. But this fails in v0.6.0:

bulker run pi,demo "pi | cowsay"
Bulker config: /home/nsheff/Dropbox/env/bulker_config/zither.yaml
Activating crate: pi,demo

/bin/sh: 1: pi | cowsay: not found

The reason is due to this change: af61845

Right now if you use a quote like "pi | cowsay", bash will parse this as an argument and pass it on to bulker. Bulker recognizes that there's space in there, and so it quotes it. If you don't quote it, and say just pi | cowsay, then bash will pass the pi to bulker but will consume the pipe, so bulker can't pass the piped command within it.

So, the fix to allow quotes is great, but it breaks the ability pass piped commands as quotes. I need to be able to pass quoted, spaced args, that will stay quoted -- but also pass pipes, which should be unquoted.

I do not know a solution to this problem, other than to suggest using bulker activate instead of bulker run for complicated things like this that require quotes or pipes. You can use --echo mode in activate to embed in scripts.

@nsheff nsheff added enhancement New feature or request brainstorming labels Jan 15, 2021
@nsheff
Copy link
Member Author

nsheff commented Mar 2, 2021

I updated the demo to avoid the problem with bulker run for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brainstorming enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant