Failure when activating plugin zip containing files in subdirectory #881
Labels
[Package][@wp-playground] Blueprints
[Priority] High
[Type] Bug
An existing feature does not function as intended
When loading a plugin via a blueprint
pluginZipFile
step, Playground seems to fail silently if the zip file contains its php files in a subdirectory. It produces a console error like this:Proceeding without the FILE.ZIP plugin. Could not install it in wp-admin. The original error was: Error: Could not find plugin entry file.
Installing the exact same zip file via Add New Plugins in wp-admin works fine. I think this is likely because the blueprint plugin install/activate step doesn't recurse into subdirectories:
wordpress-playground/packages/playground/blueprints/src/lib/steps/activate-plugin.ts
Line 57 in ea0549a
..whereas I think there's some magic code in core's
unzip_file()
function that quietly lops off a leading subdirectory when unzipping the package to install. That's an educated guess though, I haven't confirmed it.The text was updated successfully, but these errors were encountered: