Commit 6c08e63
fix(postCreate): graceful handling when .git is missing
If the user opens the devcontainer before running `git init`, uv sync
fails opaquely because setuptools-scm can't compute a version. VS
Code's wrapper hides the real stderr, leaving an exit-1 stack trace
with no clue about the cause.
postCreate.sh now detects a missing .git directory, prints a clear
warning explaining what's happening, falls back to
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_<DIST>=0.0.0 so uv sync finishes,
and skips pre-commit install (which needs .git/hooks). Once the user
runs `git init && git add . && git commit`, re-running the script
picks up the real version from git automatically.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5cf9c82 commit 6c08e63
1 file changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
7 | 34 | | |
8 | 35 | | |
9 | 36 | | |
10 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
11 | 40 | | |
12 | 41 | | |
13 | 42 | | |
14 | 43 | | |
15 | | - | |
| 44 | + | |
16 | 45 | | |
17 | 46 | | |
18 | 47 | | |
0 commit comments