cal-itp / mobility-marketplace

A one-stop resource for modern, equitable and accessible public transit products and services.
https://www.camobilitymarketplace.org/
GNU Affero General Public License v3.0
5 stars 1 forks source link

Bug: Configure git to install pre-commit #558

Closed machikoyasuda closed 1 month ago

machikoyasuda commented 2 months ago

The bug

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 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