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
Fix restoring working directory when building legacy CLI kernel handler #33
Conversation
This seems to be incomplete. webrootDir is still used several places. |
It is, but I think that is intended, right? |
Has this always been the case? What does #31 do that changes this behavior? Why does the legacy kernel loader not restore the working director in the first place? |
I can't answer that unfortunately. Maybe your fix just revealed this issue now. |
@andrerom Do you mean in just the loader? For example the same fix should be applied to building the web legacy kernel too. webrootDir seems to only be need as a fallback for Kernel::leaveLegacyRootDir, which I'm not too sure about. When would Kernel not have a previous previousRunningDir to switch back to as once he kernel is constructed it would be set by the calling of enterLegacyRootDir? |
I think that restoring to webroot when building web handler is intended, because, after all, working directory for the web itself IS webroot and not project root. But ofcourse, I might be wrong. Maybe @lolautruche can give some insight |
I think it looks ok now, as you said in web and rest context web folder is expected when not in legacy folder. +1 |
+1 |
Fix restoring working directory when building legacy CLI kernel handler
After merging #31, and associated PR in
ezsystems/ezpublish-kernel
, I get an error when runningassets:install
command:This fixes the issue by making sure that the previously used working directory is restored after building CLI kernel handler, instead of restoring to web root (
web/
).