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

Function removeCopilot

pkg/cmd/copilot/copilot.go:448–458  ·  view source on GitHub ↗
(installDir string)

Source from the content-addressed store, hash-verified

446}
447
448func removeCopilot(installDir string) error {
449 if _, err := os.Stat(installDir); os.IsNotExist(err) {
450 return fmt.Errorf("failed to remove Copilot CLI: Copilot CLI not installed through `gh`")
451 }
452
453 if err := os.RemoveAll(installDir); err != nil {
454 return fmt.Errorf("failed to remove Copilot CLI: %w", err)
455 }
456
457 return nil
458}

Callers 2

TestRemoveCopilotFunction · 0.85
runCopilotFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by 1

TestRemoveCopilotFunction · 0.68