Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f02b9fc
[CLI] Replace process.exit() with thrown errors in library code paths
gcsecsey Apr 10, 2026
1f40fb5
Remove all process.exit() calls from run-cli.ts exports
brandonpayton Apr 11, 2026
414b4a2
Remove duplicate error printing in runCLI catch block
gcsecsey Apr 13, 2026
f65ea7c
Include root cause in mount error message
gcsecsey Apr 13, 2026
2d5245a
Bump timeouts for new tests that are timing out on Windows
brandonpayton Apr 13, 2026
49700ac
Merge remote-tracking branch 'origin/trunk' into gcsecsey/php-error-s…
gcsecsey May 8, 2026
02721a7
Merge remote-tracking branch 'fork/gcsecsey/php-error-server-restart'…
gcsecsey May 8, 2026
b537bda
[CLI] Close bound server when onBind throws
gcsecsey May 11, 2026
dfe50e9
[Blueprints] Format activate-plugin.spec.ts
gcsecsey May 11, 2026
e52e648
Merge remote-tracking branch 'origin/trunk' into gcsecsey/php-error-s…
gcsecsey May 11, 2026
13da9a6
Merge remote-tracking branch 'origin/trunk' into gcsecsey/php-error-s…
gcsecsey Jun 18, 2026
ee8df33
Merge branch 'trunk' into gcsecsey/php-error-server-restart
gcsecsey Jun 30, 2026
5d83b44
[CLI] Dispose spawned workers when boot fails outside debug mode
gcsecsey Jul 7, 2026
7da57c5
[CLI] Show a clean error when resetting an unmanaged site
gcsecsey Jul 7, 2026
baece8d
Merge remote-tracking branch 'fork/gcsecsey/php-error-server-restart'…
gcsecsey Jul 7, 2026
bd83f27
Merge remote-tracking branch 'origin/trunk' into gcsecsey/php-error-s…
gcsecsey Jul 7, 2026
5244820
[CLI] Clean error output, prevent temp-dir leak, tighten error API
brandonpayton Jul 10, 2026
4168045
Merge remote-tracking branch 'origin/trunk' into gcsecsey/php-error-s…
brandonpayton Jul 11, 2026
93125da
Merge branch 'trunk' into gcsecsey/php-error-server-restart
gcsecsey Jul 13, 2026
b27f5f4
Merge branch 'trunk' into gcsecsey/php-error-server-restart
brandonpayton Jul 13, 2026
46b4f7a
[CLI] Address signal and cleanup test feedback
brandonpayton Jul 14, 2026
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion packages/playground/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,33 @@ function runCLI() {
// Dynamic import avoids loading run-cli when we're about to respawn.
// Do not await — top-level await is not supported in all environments.
import('./run-cli').then(({ parseOptionsAndRunCLI }) => {
parseOptionsAndRunCLI(args);
parseOptionsAndRunCLI(args)
.then((result) => {
if ('exitCode' in result) {
process.exit(result.exitCode);
return;
}

// A server is running. Clean up and exit on
// SIGINT / SIGTERM.
const cleanUpAndExit = (() => {
let cleaning: PromiseLike<void>;
return async () => {
if (!cleaning) {
cleaning = result[Symbol.asyncDispose]();
}
await cleaning;
process.exit(0);
};
})();
process.on('SIGINT', cleanUpAndExit);
process.on('SIGTERM', cleanUpAndExit);
})
.catch(() => {
// Unexpected error — already logged by
// parseOptionsAndRunCLI.
process.exit(1);
});
});
Comment thread
brandonpayton marked this conversation as resolved.
}

Expand Down
20 changes: 16 additions & 4 deletions packages/playground/cli/src/mounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,22 @@ export function parseMountDirArguments(mounts: string[]): Mount[] {

export async function mountResources(php: PHP, mounts: Mount[]) {
for (const mount of mounts) {
await php.mount(
mount.vfsPath,
createNodeFsMountHandler(mount.hostPath)
);
try {
await php.mount(
mount.vfsPath,
createNodeFsMountHandler(mount.hostPath)
);
} catch (error) {
// Wrap the raw mount failure with the offending paths and a
// root-cause summary so callers that only read `.message`
// (e.g. the boot-failure path) still get an actionable error.
const errorSummary =
error instanceof Error ? error.message : String(error);
throw new Error(
`Error mounting path ${mount.hostPath} at ${mount.vfsPath}: ${errorSummary}`,
{ cause: error }
);
}
}
}

Expand Down
Loading
Loading