MCPcopy Create free account
hub / github.com/catppuccin/cli / CloneRepo

Function CloneRepo

internal/ui/progress.go:32–47  ·  view source on GitHub ↗

CloneRepo clones a repo into the specified location.

(stagePath string, repo string)

Source from the content-addressed store, hash-verified

30
31// CloneRepo clones a repo into the specified location.
32func CloneRepo(stagePath string, repo string) string {
33 org := utils.GetEnv("ORG_OVERRIDE", "catppuccin")
34 gitProgress := GitProgress{
35 Progress: 0,
36 }
37 _, err := git.PlainClone(stagePath, false, &git.CloneOptions{
38 URL: fmt.Sprintf("https://github.com/%s/%s.git", org, repo),
39 Progress: gitProgress,
40 })
41 if err != nil {
42 // fmt.Println(err)
43 log.WithError(err).Error("failed to clone repo")
44
45 }
46 return stagePath
47}
48
49func StartClone(repo string) tea.Cmd {
50 return func() tea.Msg {

Callers 1

StartCloneFunction · 0.70

Calls 2

GetEnvFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected