Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: fix execSync inheriting stdio (#39152)

Dmitry Gozman0f10ed556c02
diff --git a/packages/playwright-core/src/server/utils/hostPlatform.ts b/packages/playwright-core/src/server/utils/hostPlatform.ts
index 8df9ceb342..4e6cba85a5 100644
--- a/packages/playwright-core/src/server/utils/hostPlatform.ts
+++ b/packages/playwright-core/src/server/utils/hostPlatform.ts
@@ -140,7 +140,7 @@ let hasGpuMacValue: boolean | undefined;
export function hasGpuMac() {
try {
if (hasGpuMacValue === undefined) {
- const output = execSync('system_profiler SPDisplaysDataType').toString();
+ const output = execSync('system_profiler SPDisplaysDataType', { stdio: ['ignore', 'pipe', 'ignore'] }).toString();
hasGpuMacValue = output.includes('Metal: Supported') || output.includes('Metal Support: Metal');
}
return hasGpuMacValue;