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

Function readPathFromFile

pkg/cmd/extension/manager.go:738–747  ·  view source on GitHub ↗

reads the product of makeSymlink on Windows

(path string)

Source from the content-addressed store, hash-verified

736
737// reads the product of makeSymlink on Windows
738func readPathFromFile(path string) (string, error) {
739 f, err := os.Open(path)
740 if err != nil {
741 return "", err
742 }
743 defer f.Close()
744 b := make([]byte, 1024)
745 n, err := f.Read(b)
746 return strings.TrimSpace(string(b[:n])), err
747}
748
749func isBinExtension(client *http.Client, repo ghrepo.Interface) (isBin bool, err error) {
750 var r *release

Callers 1

listMethod · 0.85

Calls 3

OpenMethod · 0.80
CloseMethod · 0.65
ReadMethod · 0.45

Tested by

no test coverage detected