Skip to content

Commit 5f43842

Browse files
committed
docs(claude): pre-create cache dirs before GOCACHE/GOTMPDIR override
go test fails if GOTMPDIR points at a directory that does not exist yet. Tell readers to mkdir -p the cache and lint-cache directories first, then show the full GOCACHE/GOTMPDIR/GOLANGCI_LINT_CACHE invocations as a runnable block. https://claude.ai/code/session_01Bwxu5LAwzKLCbx4L4r8QgX
1 parent d5174cc commit 5f43842

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ go test -run TestName ./store/...
2323
go test -race ./kv/...
2424
```
2525

26-
If `$GOCACHE` is sandbox-blocked (macOS), prefix with `GOCACHE=$(pwd)/.cache GOTMPDIR=$(pwd)/.cache/tmp`. The lint cache analog is `GOLANGCI_LINT_CACHE=$(pwd)/.golangci-cache`.
26+
If `$GOCACHE` is sandbox-blocked (macOS), create the cache dirs first (Go errors out if `GOTMPDIR` does not exist), then prefix the command:
27+
28+
```bash
29+
mkdir -p "$(pwd)/.cache/tmp" "$(pwd)/.golangci-cache"
30+
GOCACHE=$(pwd)/.cache GOTMPDIR=$(pwd)/.cache/tmp go test ./...
31+
GOCACHE=$(pwd)/.cache GOLANGCI_LINT_CACHE=$(pwd)/.golangci-cache golangci-lint run
32+
```
2733

2834
Single-node server (etcd/raft is the default backend):
2935

0 commit comments

Comments
 (0)