How to pass options to scripts executed via thor task? #259

Open
szimek opened this Issue Oct 2, 2012 · 0 comments

1 participant

@szimek

Here's a scenario:

foreman run ruby -Itest test/unit/a_test.rb

foreman run is actually a Thor task. The syntax used above doesn't pass -Itest to Ruby, but parses it as -I, -t, -e, -s -t (https://github.com/wycats/thor/blob/master/lib/thor/parser/options.rb#L63).

-e is a valid Foreman option (alias for --env), so it sets options[:env] = "env", which causes an error, because Foreman tries then to look for a file with such name.

Is there a different way to pass ruby -Itest test/unit/a_test.rb option to actually make it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment