lxc / ruby-lxc

ruby bindings for liblxc
https://linuxcontainers.org/lxc
GNU Lesser General Public License v2.1
134 stars 29 forks source link

LXC.run_command path issue #36

Closed bararchy closed 8 years ago

bararchy commented 8 years ago

Hi,

I'm using your gem to automate container creation and execute commands. I'm having an issue when trying to execute a command that includes a path, it seems that passing " instead of ' have weird effects. Also, trying to do clamscan * on a dir says "Cannot find /home/ubuntu/" instead of "expending" the \ to all the files in the path, maybe it's something to do with how the run_command is executed in the container shell ? is it bash or sh ?

Thanks is advance :)

andrenth commented 8 years ago

What kind of weird side affects are you seeing?

LXC.run_command doesn't do shell wildcard expansion, so you have to use Dir.glob yourself.

bararchy commented 8 years ago

@andrenth I see. Thanks for the answer, I changed my code accordingly.