Accept string arguments
This commit is contained in:
parent
5c1d459b67
commit
892e1637b1
|
@ -1160,6 +1160,9 @@ lxc_run_command(VALUE self, VALUE rb_command)
|
||||||
lxc_attach_command_t cmd;
|
lxc_attach_command_t cmd;
|
||||||
VALUE rb_program;
|
VALUE rb_program;
|
||||||
|
|
||||||
|
if (TYPE(rb_command) == T_STRING)
|
||||||
|
rb_command = rb_str_split(rb_command, " ");
|
||||||
|
|
||||||
rb_program = rb_ary_entry(rb_command, 0);
|
rb_program = rb_ary_entry(rb_command, 0);
|
||||||
cmd.program = StringValuePtr(rb_program);
|
cmd.program = StringValuePtr(rb_program);
|
||||||
cmd.argv = ruby_to_c_string_array(rb_command);
|
cmd.argv = ruby_to_c_string_array(rb_command);
|
||||||
|
|
Loading…
Reference in a new issue