Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

szimek opened this issue Oct 2, 2012 · 0 comments

Comments

@szimek
Copy link

szimek commented Oct 2, 2012

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant