compilerla / compiler.la

Compiler's website
https://compiler.la
Apache License 2.0
4 stars 2 forks source link

Bug: Configure git to install pre-commit #226

Closed machikoyasuda closed 2 months 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

machikoyasuda commented 2 months ago

Versions, just in case:

Version: 1.85.2 (Universal) Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:32.531Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin arm64 23.3.0

Apple M1 Pro / Version 14.3.1 (23D60)

Docker version 26.1.4, build 5650f9b