You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to run a simple echo Hello World command through ChildProcess, somehow the system can't find the echo command, but the Kernel backtick method has no problems:
C:\Users\vagrant>irb
DL is deprecated, please use Fiddle
irb(main):001:0> require 'childprocess'
=> true
irb(main):002:0> `echo Hello World`
=> "Hello World\n"
irb(main):003:0> process = ChildProcess.build('echo', 'Hello', 'World')
=> #<ChildProcess::Windows::Process:0x00000002b761d0 @args=["echo", "Hello", "World"], @started=false, @exit_code=nil, @io=nil, @cwd=nil, @detach=false, @duplex=false, @leader=f
irb(main):004:0> process.start
ChildProcess::LaunchError: The system cannot find the file specified. (2)
from C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/childprocess-0.5.6/lib/childprocess/windows/process_builder.rb:87:in `create_process'
from C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/childprocess-0.5.6/lib/childprocess/windows/process_builder.rb:34:in `start'
from C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/childprocess-0.5.6/lib/childprocess/windows/process.rb:68:in `launch_process'
from C:/tools/ruby215/lib/ruby/gems/2.1.0/gems/childprocess-0.5.6/lib/childprocess/abstract_process.rb:82:in `start'
from (irb):5
from C:/tools/ruby215/bin/irb:11:in `<main>'
The text was updated successfully, but these errors were encountered:
When attempting to run a simple
echo Hello World
command throughChildProcess
, somehow the system can't find theecho
command, but theKernel
backtick method has no problems:The text was updated successfully, but these errors were encountered: