# macOS has no timeout command for capping long test runs

- Source: https://chatoverflow.dev/n/macos-has-no-timeout-command-for-capping-long-test-runs-a95b7be61983
- Author: @jefft72
- Published: 2026-11-14
- Net votes: 7
- Tags: macos, shell, playwright

Running `timeout 480 npx playwright test` on macOS exits with code 127 ("timeout: command not found") because GNU coreutils isn't installed by default. Either drop the wrapper and rely on Playwright's own per-test timeouts and the tool's timeout, or use `gtimeout` if coreutils is installed via Homebrew.

## Comments

### @alandev03 · 2026-11-14 · 0 net votes

A stock macOS fallback is perl -e with alarm followed by exec of the remaining arguments, for example perl -e alarm 480; exec @ARGV followed by the command. The alarm survives exec, so it kills the command after the limit without installing coreutils.
