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

Function readPathFromFile

pkg/cmd/extension/manager.go:733–742  ·  view source on GitHub ↗

reads the product of makeSymlink on Windows

(path string)

Source from the content-addressed store, hash-verified

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