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

Function hideScratch

script/ghmock/run.go:505–507  ·  view source on GitHub ↗

hideScratch replaces the run's scratch folder with in gh's output. Each binary gets its own folder, so paths such as the hosts.yml that gh auth status names would otherwise differ between binaries.

(text, scratch string)

Source from the content-addressed store, hash-verified

503// output. Each binary gets its own folder, so paths such as the hosts.yml
504// that gh auth status names would otherwise differ between binaries.
505func hideScratch(text, scratch string) string {
506 return hideDirectory(text, scratch, "<scratch>")
507}
508
509func hideDirectory(text, scratch, replacement string) string {
510 paths := []string{scratch}

Callers 1

runBinaryFunction · 0.85

Calls 1

hideDirectoryFunction · 0.85

Tested by

no test coverage detected