-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
remove features' directories on windows with proper access #5389
Conversation
Which tests does this fix exactly? The cucumber one? |
yes.. thought you'd understand if I just mentioned features |
It works as far as I can tell before:
after:
|
But there seems to be a failure in Travis. |
@@ -1,12 +1,13 @@ | |||
Before do | |||
FileUtils.rm_rf(Paths.test_dir) if Paths.test_dir.exist? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this line to ensure every scenario starts with a clean slate
Thats a known bug.. happens randomly to random suites.. Maintainers can restart that test to get it to pass.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! I restarted the failing Travis build. Once that's good, we can merge.
FileUtils.mkdir_p(Paths.test_dir) unless Paths.test_dir.directory? | ||
Dir.chdir(Paths.test_dir) | ||
end | ||
|
||
# | ||
|
||
After do | ||
Paths.test_dir.rmtree if Paths.test_dir.exist? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why does .rmtree
fail? Can you paste the error or describe the issue? It should be identical to FileUtils.rm_rf
IIRC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.rmtree
does not fail per se. The feature directories do get removed completely (verified locally), but on Windows it also raises an alarm:
Permission denied @ dir_s_rmdir - C:/projects/jekyll/tmp/jekyll (Errno::EACCES)
C:/projects/jekyll/features/step_definitions.rb:9:in `After'
I stumbled upon the fix when I tried the identical FileUtils.rm_rf
method. This method manipulates files rather than try to modify the directory attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting! @envygeeks, is this a part of Pathutil?
@jekyllbot: merge +dev |
Feature directories generated during cucumber tests currently throw a
Errno::EACCES
exception after every scenario runs on windows.This Pull resolves this issue.
/cc @jekyll/windows