MCPcopy
hub / github.com/cli/cli / stubExtension

Function stubExtension

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

Source from the content-addressed store, hash-verified

1438}
1439
1440func stubExtension(path string) error {
1441 if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
1442 return err
1443 }
1444 f, err := os.OpenFile(path, os.O_CREATE, 0755)
1445 if err != nil {
1446 return err
1447 }
1448 return f.Close()
1449}
1450
1451func stubPinnedExtension(path string, pinnedVersion string) error {
1452 if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected