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

Allow commands with spaces to be constructed as new Commands #86

Closed
wants to merge 2 commits into from

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Feb 16, 2015

If you were using the appraisal executable and passed an argument that
contained spaces, those spaces would not be preserved when Appraisal
went to execute the full command. For instance, this command...

appraisal 4.2 rspec spec/some/file_spec.rb -e "some example group"

Should be expanded as follows:

BUNDLE_GEMFILE=$PWD/gemfiles/4.2.gemfile rspec spec/some/file_spec.rb -e "some example group"

...but before this commit would be incorrectly expanded as follows:

BUNDLE_GEMFILE=$PWD/gemfiles/4.2.gemfile rspec spec/some/file_spec.rb -e some example group

If you were using the `appraisal` executable and passed an argument that
contained spaces, those spaces would not be preserved when Appraisal
went to execute the full command. For instance, this command...

    appraisal 4.2 rspec spec/some/file_spec.rb -e "some example group"

*Should* be expanded as follows:

    BUNDLE_GEMFILE=$PWD/gemfiles/4.2.gemfile rspec spec/some/file_spec.rb -e "some example group"

...but before this commit would be incorrectly expanded as follows:

    BUNDLE_GEMFILE=$PWD/gemfiles/4.2.gemfile rspec spec/some/file_spec.rb -e some example group
run 'appraisal 1.0.0 ruby -rbundler/setup -rdummy "test with spaces.rb"'
}

expect(&assertion).not_to raise_error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add assertion for output as well? I think I care more that the command get executed and yield correct result than if we return zero exit status.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, sure.

@mcmire
Copy link
Contributor Author

mcmire commented Feb 19, 2015

@sikachu Ready for re-review.

@sikachu sikachu added this to the v1.0.3 milestone Mar 4, 2015
@mcmire mcmire closed this in 3bb7825 Mar 4, 2015
@sikachu
Copy link
Contributor

sikachu commented Mar 4, 2015

@mcmire I squashed the commits and merged them. Thank you!

mcmire added a commit that referenced this pull request Mar 4, 2015
If you were using the `appraisal` executable and passed an argument that
contained spaces, those spaces would not be preserved when Appraisal
went to execute the full command. For instance, this command...

    appraisal 4.2 rspec spec/some/file_spec.rb -e "some example group"

*Should* be expanded as follows:

    BUNDLE_GEMFILE=$PWD/gemfiles/4.2.gemfile rspec spec/some/file_spec.rb -e "some example group"

...but before this commit would be incorrectly expanded as follows:

    BUNDLE_GEMFILE=$PWD/gemfiles/4.2.gemfile rspec spec/some/file_spec.rb -e some example group

Close #86
@mcmire
Copy link
Contributor Author

mcmire commented Mar 4, 2015

Sweet, thanks!

@mcmire mcmire deleted the ew-an-allow-commands-with-spaces branch March 4, 2015 16:54
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.

None yet

2 participants