-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Scripts: Fix blocks manifest generation when directory name has space #69766
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
Conversation
Size Change: 0 B Total Size: 1.84 MB ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hey @t-hamano, Screencast:Screen.Recording.2025-03-31.at.5.30.42.PM.mov |
…#69766) * Scripts: Fix blocks manifest generation when directory name has space * Add changelog Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org> Co-authored-by: srikat <srikat@git.wordpress.org>
…WordPress#69766) * Scripts: Fix blocks manifest generation when directory name has space * Add changelog Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org> Co-authored-by: srikat <srikat@git.wordpress.org>
What?
Fixes #69760
Follow-up #69578
Why?
If the scripts command has the
--blocks-manifest
flag, thebuild-blocks-manifest
command is executed internally. However, if the scripts is executed inside the directory with spaces, the following incorrect command is generated:Because there is no quote, the following invalid command will actually be executed:
Testing Instructions
Local Sites
)npx @wordpress/create-block test-block
test-block
npm run start
ornpm run build
Local Sites/test-block/build/
directory doesn't haveblocks-manifest.php
fileLocal Sites/test-block/node-modules/@wordpress/scripts/config/webpack.config.js
file and add changes that are the same as this PRnpm run start
ornpm run build
againLocal Sites/test-block/build/
directory hasblocks-manifest.php
file