-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Expect drive letter only on vanilla windows #8227
Expect drive letter only on vanilla windows #8227
Conversation
Bash on Windows expands similar to paths on Linux
@noproblema This patch should resolve your issue, To test at your end, run the following:
Let me know if the test passes on your end now. |
Thanks Ashwin. Yes, that solves my issue. But... I stil think that these tests will fail in windows because they will compare "C:/tmp" with "/tmp". Anyway, I don't want to make a full windows installation only to test it. If I'm right you will find it, if not... well, will not be my first nor my last mistake. For me that issue is closed.
|
Thank you for testing @noproblema |
@jekyllbot: merge +dev |
Thanks Ashwin
I think that we are not talking about the same test. Below the one that I'm talking about and that is bugging me:
should "have an array for plugins if passed as an array" do
site = Site.new(site_configuration(
"plugins_dir" => ["/tmp/plugins", "/tmp/otherplugins"]
))
array = [temp_dir("plugins"), temp_dir("otherplugins")]
assert_equal array, site.plugins
end
> we're not comparing C:/tmp with /tmp,
As I read the code it compares ["/tmp/plugins", "/tmp/otherplugins"] with [temp_dir("plugins"), temp_dir("otherplugins")] as site_configuration only stores the values, don't change them.
I can't understand how that test passes in windows.
On Wednesday, June 3, 2020, 05:46:21 PM GMT+2, Ashwin Maroli <notifications@github.com> wrote:
Thank you for testing @noproblema
Once again, I'd like to inform you that we're not comparing C:/tmp with /tmp, but that we're testing if the resulting path will be C:/tmp/whatever on Windows and /tmp/whatever on Unix-based platforms.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@noproblema You yourself told me a couple of days ago that with the proposed change here, the tests pass successfully on your computer. Ergo, the tests should pass with the latest I will clarify it for you one last time and continued queries will be ignored. The test code you're referring to is: Lines 39 to 45 in 81c1350
The fixture site used in the test is configured to point to an array of paths. The config translates to the following YAML data (simulating what the hypothetical user has given Jekyll): plugins_dir:
- "/tmp/plugins"
- "/tmp/otherplugins" On Unix based platforms (and apparently on Bash on Windows, too), Jekyll processes the above configuration as Ruby array:
On pure Windows platform, Jekyll processes the above configuration into Ruby array based on the current drive the user's source directory is:
What the test-helper method Therefore, the code If it is still not clear, you probably need to brush up on your Ruby and programming skills. |
Summary
Bash on Windows expands similar to paths on Linux
Context
Based on discussion in #8220 with @noproblema
Resolves #8220