rye icon indicating copy to clipboard operation
rye copied to clipboard

Rye.shell does not setup the cmd field of the RAP out object

Open rrepen opened this issue 12 years ago • 0 comments

The RYE::SHELL has this code: ... rap = Rye::Rap.new(self) rap.add_stdout(stdout || '') rap.add_stderr(stderr || '') rap.add_exit_status($?) rap ...

To get the cmd string back I have added the following two lines ... cmd = Rye.prepare_command(cmd, args) cmd_str = cmd.dup # Take a copy of the command before it gets the redirection part cmd << " 2>#{tf.path}" # Redirect STDERR to file. Works in DOS too. ... rap = Rye::Rap.new(self) rap.add_stdout(stdout || '') rap.add_stderr(stderr || '') rap.add_exit_status($?) rap.cmd = cmd_str # Add the cmd string to the RAP object rap

By doing this I get back the command string and I have the same behavior as using a the Rye::Box

René

rrepen avatar Oct 02 '12 09:10 rrepen