MCPcopy Index your code
hub / github.com/cli/cli / readPathFromFile

Function readPathFromFile

pkg/cmd/extension/manager.go:732–741  ·  view source on GitHub ↗

reads the product of makeSymlink on Windows

(path string)

Source from the content-addressed store, hash-verified

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