Commit 66ded93
fix(pnpm-store): 🐛 fix silent failures in guard script ownership handling
Three bugs in the postCreateCommand guard:
- stat failure (NFS, overlay FS) returned empty store_owner, silently skipping
chown and leaving the store root-owned with no diagnostic
- sudo absent: the chown if-block was skipped entirely with no warning, causing
pnpm EACCES on first write with nothing in the logs
- sudo chown used 2>/dev/null || true, swallowing failures and printing a false
success checkmark regardless of outcome
Fix: treat stat failure as "unknown" (attempt chown anyway), split the sudo
check to emit a warning when sudo is absent, and surface chown failures instead
of swallowing them.
Also add || true to the build-time mkdir -p to prevent aborting the image build
on unusual filesystems where root cannot create /workspaces.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1a11c83 commit 66ded93
2 files changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
126 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
| |||
0 commit comments