func (b *Box) Clone() error { if b.Repo != nil && b.Repo.Type != repository.IMAGE && !b.Repo.OneClick { scm := repository.Manager(b.Repo.Source) if scm == nil { return fmt.Errorf("couldn't locate the repository manager (%s)", b.Repo.Source) } if err := scm.Clone(b.Repo); err != nil { return err } } return nil }
//bit screwy we are doing it twice inside here and in provisioner func scm() repository.RepositoryManager { return repository.Manager("github") }