-
Notifications
You must be signed in to change notification settings - Fork 327
Closed
Labels
[Feature] PHP.wasm[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
As seen in https://github.com/WordPress/wordpress-playground/pull/451/files#diff-a063d4a01f49cda0eb3523f6cf5f33e7f7f033407effb7ed7d4c4dffb24fe84d, php may throw an error that indicates exit status 0. This is a bug, as 0 means everything executed successfully and no errors were encountered. Let's find the root cause and either prevent the error from being thrown at all, or silence it at the framework level.
try {
php.useHostFilesystem();
await php.cli(phpArgs);
} catch (resultOrError) {
const success =
resultOrError.name === 'ExitStatus' && resultOrError.status === 0;
if (!success) {
throw resultOrError;
}
}
aschmelyun
Metadata
Metadata
Assignees
Labels
[Feature] PHP.wasm[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended