Skip to content

Allowing both piping and quotes in bulker run #74

@nsheff

Description

@nsheff

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions