MCPcopy Create free account
hub / github.com/cli/cli / snapshotConfig

Method snapshotConfig

script/ghmock/configfixture.go:16–25  ·  view source on GitHub ↗
(runID, source string)

Source from the content-addressed store, hash-verified

14}
15
16func (s *state) snapshotConfig(runID, source string) (string, error) {
17 if source == "" {
18 return "", nil
19 }
20 relative := filepath.Join("config", "runs", runID, "before")
21 if err := copyConfigTree(source, filepath.Join(s.dir, relative)); err != nil {
22 return "", fmt.Errorf("copying configuration fixture: %w", err)
23 }
24 return filepath.ToSlash(relative), nil
25}
26
27// copyConfigTree copies fixture bytes without following contained symlinks.
28// Each destination is new and private; no caller configuration is copied implicitly.

Callers 1

runAllFunction · 0.80

Calls 3

copyConfigTreeFunction · 0.85
JoinMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected