thoughtbot / cocaine

A small library for doing (command) lines.
https://robots.thoughtbot.com
Other
785 stars 55 forks source link

`Cocaine::CommandLine.path` isn't used for `PosixRunner` or `ProcessRunner` #63

Closed jferris closed 10 years ago

jferris commented 10 years ago

If you set the path:

Cocaine::CommandLine.path = '/some/path'

And then try to run something on that path:

Cocaine::CommandLine.new('some_command').run

Cocaine looks on the system path and not the overridden path for PosixRunner and ProcessRunner.

Here's a demo: https://gist.github.com/jferris/9791591

The included spec (demo.rb) fails for those two runners but passes for BackticksRunner and PopenRunner.

jyurek commented 10 years ago

I used your demo.rb pretty much exactly as my spec and pushed out 0.5.4 to fix this.