//go:build testbuild package mac import ( "context" "io" "os" "path/filepath" ) // In a test build only, ClaudeStandInEnv may name a local file that // stands in for the official download (no test reaches the network). // What it serves is still checked against the pin. const claudeStandInBuild = true func claudeStandIn(getenv func(string) string) ClaudeFetch { path := getenv(ClaudeStandInEnv) if !filepath.IsAbs(path) { return nil } return func(context.Context, string) (io.ReadCloser, error) { return os.Open(path) } } // PinnedForTest is c pinned to pin (a test build's own CLI stand-in). func PinnedForTest(c ClaudeCLI, pin string) ClaudeCLI { c.pin = pin; return c }