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
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.
How can I pipe something to bulker run?
In bulker v 0.5.0 you could do:
And this is even shown in the demo. But this fails in
v0.6.0
:The reason is due to this change: https://github.com/databio/bulker/commit/af618459367fdcfe98c4798b79a6b55a669a6015
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 thepi
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 ofbulker run
for complicated things like this that require quotes or pipes. You can use--echo
mode in activate to embed in scripts.