Skip to content

Commit 6e77eb2

Browse files
committed
Fail closed on PHPUnit bootstrap diagnostics
1 parent d207aa8 commit 6e77eb2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/runtime-playground/src/wordpress-command-runners.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,10 @@ export async function runPhpunitCommand({
952952
await persistPluginPhpunitResult(server, resultFile, artifactRoot)
953953
await persistVfsDiagnosticFileToHost(server, resultFile, `/wordpress/wp-content/plugins/${pluginSlug}/.pg-test-result.txt`, mounts)
954954
assertPlaygroundResponseOk("wordpress.phpunit", response)
955+
const structured = await readPluginPhpunitDiagnostic(server, resultFile)
956+
if (structured) {
957+
throw new Error(`wordpress.phpunit could not run: ${structured}`)
958+
}
955959

956960
return response.text
957961
}

0 commit comments

Comments
 (0)