oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1//go:build testbuild
2
3package mac
4
5import (
6 "context"
7 "io"
8 "os"
9 "path/filepath"
10)
11
12// In a test build only, ClaudeStandInEnv may name a local file that
13// stands in for the official download (no test reaches the network).
14// What it serves is still checked against the pin.
15const claudeStandInBuild = true
16
17func claudeStandIn(getenv func(string) string) ClaudeFetch {
18 path := getenv(ClaudeStandInEnv)
19 if !filepath.IsAbs(path) {
20 return nil
21 }
22 return func(context.Context, string) (io.ReadCloser, error) { return os.Open(path) }
23}
24
25// PinnedForTest is c pinned to pin (a test build's own CLI stand-in).
26func PinnedForTest(c ClaudeCLI, pin string) ClaudeCLI { c.pin = pin; return c }
27