Repository navigation
Conversation
The path to rake_test_loader.rb was interpolated into the shell command unquoted, so the test task failed when rake was installed under a directory with a space in its name. Co-authored-by: Claude Mythos 5.2 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rake::TestTaskruns the tests through a single shell string. The test files and the-Iload path are wrapped in double quotes, but with the default:rakeloader the path torake_test_loader.rbis interpolated bare. When rake is installed under a directory whose name contains a space (a home directory with a space, or a project such as~/My Projects/appusingbundle config path vendor/bundle), the shell splits the loader path andrake testfails:This is a regression. The loader path was quoted from 87e39db (2009) until 063950d (#357, "Simplify default rake test loader") replaced
"\"#{rake_loader}\""with an unquoted-rargument, and 37635e6 later changed that argument to the current form without adding quotes.Fix
This change wraps the loader path in double quotes in
TestTask#run_code, restoring the quoting that 063950d removed and matching howfile_list_stringandruby_opts_stringquote their paths.A functional test runs a test task from a copy of
libunder a temporary directory namedrake with space.