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
Serve only files when running lhci collect
#445
Conversation
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.
awesome thank you @ojizero! would you be able to add this to one of our autorun test cases?
I'm thinking it's fine if you just add a file folder.html/invisible.html
to https://github.com/GoogleChrome/lighthouse-ci/tree/master/packages/cli/test/fixtures/autorun-static-dir/build and make sure we don't pick it up in the existing test, no need to write a new one
@patrickhulce hmmmm 🤔 just thinking out loud here but isn't the condition shouldn't the check be only for hidden files? i.e. |
Maybe, but I don't think we should change it here for two reasons.
|
very true yea changing this would be a breaking change and may introduce unexpected behaviours ! I'll add the new fixture for the test as it is now 👍 |
Fixes the behaviour where the FallbackServer attempts to serve folders that happen to end with `.html` causing errors. Filters scanned directory for only files in it before executing any of the logic there. Fixes: GoogleChrome#444
Existing autorun tests should cover it normally and should remain unchanged
d004f09
to
87fef85
Compare
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.
implementation looks great to me, thanks @ojizero! 🎉
@@ -0,0 +1,10 @@ | |||
<!DOCTYPE html> |
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.
can you rename this file invisible.html
? :) just spelling typo
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.
if I got a dollar for every typo I make 💃 fixed
Fixes the behaviour where the FallbackServer attempts to serve folders that
happen to end with
.html
causing errors. Filters scanned directoryfor only files in it before executing any of the logic there.
Fixes: #444