Command cannot be run by timeout
Production Risk
Indicates the command could not be started at all; check path and permissions.
Exit code 125 is returned by `timeout` when it cannot execute the command itself — for example, because the command is not found or not executable. Exit code 125 is also used by `git bisect run` to indicate a test that should be skipped.
- 1`timeout` cannot execute the given command (not found, not executable)
- 2`git bisect run` script exits 125 to tell bisect to skip the current commit
timeout wrapping a non-executable path.
timeout 5s /nonexistent/command echo "Exit: $?"
expected output
bash: /nonexistent/command: No such file or directory Exit: 125
Fix 1
Verify the command path and permissions
WHEN When timeout returns 125
# Check the command exists and is executable command -v your_command ls -l /path/to/your_command
Why this works
125 from timeout means the command itself could not be started — fix the path or permissions first.
Fix 2
Use 125 in git bisect to skip commits
WHEN Writing a git bisect run script
#!/bin/bash # Return 125 to skip untestable commits make build 2>/dev/null || exit 125 make test exit $?
Why this works
git bisect interprets exit 125 as "this commit cannot be tested — skip it" rather than good/bad.
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev