MCPcopy Index your code
hub / github.com/AutoForgeAI/autoforge / isHeadless

Function isHeadless

lib/cli.js:492–501  ·  view source on GitHub ↗

Detect headless / CI environments where opening a browser is pointless.

()

Source from the content-addressed store, hash-verified

490
491/** Detect headless / CI environments where opening a browser is pointless. */
492function isHeadless() {
493 if (process.env.CI) return true;
494 if (process.env.CODESPACES) return true;
495 if (process.env.SSH_TTY) return true;
496 // Linux without a display server
497 if (!IS_WIN && platform() !== 'darwin' && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) {
498 return true;
499 }
500 return false;
501}
502
503// ---------------------------------------------------------------------------
504// Process cleanup

Callers 1

startServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected