Running the postAttachCommand from devcontainer.json...
[127422 ms] Start: Run in container: /bin/bash .devcontainer/postAttach.sh
An error has occurred: FatalError: git failed. Is it installed, and are you in a Git repository directory?
Check the log at /home/compiler/.cache/pre-commit/pre-commit.log
What's next:
Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug 82179c5c37d960b0829f5d823b5b13fbd4ee069c859faf6490dcc989ec89858b
Learn more at https://docs.docker.com/go/debug-cli/
[127976 ms] postAttachCommand failed with exit code 1. Skipping any further user-provided commands.
Done. Press any key to close the terminal
The bug
The fix
Following https://github.com/cal-itp/benefits/pull/2027 https://github.com/cal-itp/docker-python-web/pull/36 https://github.com/cal-itp/benefits/pull/2017, apply the same fix to configure git to install pre-commit https://github.com/cal-itp/eligibility-server/issues/473