Matched signals
- no such file or directory
- cannot find the path specified
- chdir
- not a git repository
- error: no such file
- working directory not found
- failed to change directory
Wrong working directory
What this failure means
A command ran in an unexpected working directory. Relative paths expected a specific directory layout that did not exist at the time of execution.
Symptoms
Faultline looks for one or more of these log fragments:
no such file or directory
cannot find the path specified
chdir
not a git repository
error: no such file
working directory not found
failed to change directory
Diagnosis
A command ran in an unexpected working directory. Relative paths expected a specific directory layout that did not exist at the time of execution.
Fix steps
- Check the
working-directoryconfiguration in your CI workflow file. - Use absolute paths or
$(pwd)references where possible. - Add
ls -labefore the failing step to confirm the directory contents. - Verify the repository structure matches what the workflow expects.
Validation
- Re-run the failing workflow step.
- Confirm the original failure signature for Wrong working directory is gone.
Why it matters
CI jobs sometimes change directory as part of a step but fail to restore the original directory, or a working-directory configuration in the workflow file points to a path that does not exist in the checked-out repository.
Prevention
- Use explicit
working-directorysteps rather than relying on implicit directory state. - Document expected working directory requirements in step names or comments.
- Add a directory existence check at the start of jobs that depend on specific paths.
- Prefer commands anchored from the repository root in reusable scripts so directory assumptions are not duplicated across workflows.
How Faultline detects it
Use faultline explain working-directory to see the full playbook.
faultline analyze build.log
faultline explain working-directory
Generated from playbooks/bundled/log/build/working-directory.yaml. Do not edit directly.