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

Function stubExtension

pkg/cmd/extension/manager_test.go:1516–1525  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

1514}
1515
1516func stubExtension(path string) error {
1517 if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
1518 return err
1519 }
1520 f, err := os.OpenFile(path, os.O_CREATE, 0755)
1521 if err != nil {
1522 return err
1523 }
1524 return f.Close()
1525}
1526
1527func stubPinnedExtension(path string, pinnedVersion string) error {
1528 if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected