Changeset 61679
- Timestamp:
- 02/18/2026 08:12:50 PM (2 weeks ago)
- File:
-
- 1 edited
-
trunk/tools/gutenberg/build-gutenberg.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/gutenberg/build-gutenberg.js
r61673 r61679 142 142 143 143 try { 144 // On Windows, shell mode is used and needs the argument wrapped in quotes 145 // On Unix, arguments are passed directly without shell parsing 146 const baseUrlArg = 147 process.platform === 'win32' 148 ? '--base-url="includes_url( \'build/\' )"' 149 : "--base-url=includes_url( 'build/' )"; 150 151 await exec( 'npm', [ 'run', 'build', '--', '--skip-types', baseUrlArg ], { 144 // Invoke the build script directly with node instead of going through 145 // `npm run build --` to avoid shell argument mangling of the base-url 146 // value (which contains spaces, parentheses, and single quotes). 147 // The PATH is extended with node_modules/.bin so that bin commands 148 // like `wp-build` are found, matching what npm would normally provide. 149 const binPath = path.join( gutenbergDir, 'node_modules', '.bin' ); 150 await exec( 'node', [ 151 'bin/build.mjs', 152 '--skip-types', 153 "--base-url=includes_url( 'build/' )", 154 ], { 152 155 cwd: gutenbergDir, 156 env: { 157 ...process.env, 158 PATH: binPath + path.delimiter + process.env.PATH, 159 }, 153 160 } ); 154 161
Note: See TracChangeset
for help on using the changeset viewer.