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

Command determines ARGV correctly when ARGV empty #59

Closed
wants to merge 1 commit into from

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Aug 16, 2013

Usually if you call rake appraisal from a project configured to use Appraisal, then everything works -- Appraisal calls rake for each of your gemfiles.

However, if you've configured rake to run rake appraisal automatically, when you call rake then Appraisal::Command throws an error. This is because it assumes that "appraisal" will be first in ARGV, which is the case when you call rake appraisal manually but not the case here. Therefore when it tries to figure out which command to run it blows up (as ARGV[1..-1] returns nil if ARGV is empty). This commit fixes that.

NOTE: I'm not sure how to test this? Is there a way?

Usually if you call `rake appraisal` from a project configured to use
Appraisal, then everything works -- Appraisal calls `rake` for each of
your gemfiles.

However, if you've configured `rake` to run `rake appraisal`
automatically, when you call `rake` then Appraisal::Command throws an
error. This is because it assumes that "appraisal" will be first in
ARGV, which is the case when you call `rake appraisal` manually but not
the case here. Therefore when it tries to figure out which command to
run it blows up (as ARGV[1..-1] returns nil if ARGV is empty). This
commit fixes that.
@sikachu
Copy link
Contributor

sikachu commented Sep 4, 2013

For some reason, this commit halts Travis build. I think it's actually safe to just call ARGV.shift and just mutates the ARGV hash. I'm going to fix this and report back.

@sikachu sikachu closed this in a885488 Sep 4, 2013
@mcmire mcmire deleted the ew-fix-command-to-determine-argv-correctly branch October 29, 2013 22:40
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

Successfully merging this pull request may close these issues.

2 participants