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

Function readPathFromFile

pkg/cmd/extension/manager.go:737–746  ·  view source on GitHub ↗

reads the product of makeSymlink on Windows

(path string)

Source from the content-addressed store, hash-verified

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