Skip to content

Commit ad9aa31

Browse files
committed
Fix mount properties not being passed to PHP worker spawner in v2 worker
The blueprints v2 worker was not correctly passing mount configurations to the PHP CLI worker spawner. RunCLIArgs uses hyphenated property names like 'mount-before-install' and 'mount', while WorkerBootRequestHandlerOptions expects camelCase 'mountsBeforeWpInstall' and 'mountsAfterWpInstall'. Without this mapping, spawned PHP CLI workers would not have access to /tmp and other mounted directories, causing 'Could not open input file' errors when running blueprints that spawn PHP subprocesses.
1 parent 57c0121 commit ad9aa31

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/playground/cli/src/blueprints-v2/worker-thread-v2.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ export class PlaygroundCliBlueprintV2Worker extends PHPWorker {
252252
};
253253
const requestHandlerOptions: WorkerBootRequestHandlerOptions = {
254254
...args,
255+
// Map RunCLIArgs mount properties to WorkerBootRequestHandlerOptions
256+
// property names for the PHP worker spawner.
257+
mountsBeforeWpInstall: args['mount-before-install'] || [],
258+
mountsAfterWpInstall: args.mount || [],
255259
createFiles: {
256260
'/internal/shared/ca-bundle.crt': rootCertificates.join('\n'),
257261
},

0 commit comments

Comments
 (0)