fix: if no remotes, skip on
This commit is contained in:
parent
decfe095fe
commit
6937bfbb0d
|
@ -309,6 +309,16 @@ func EnsureUpToDate(recipeName string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
remotes, err := repo.Remotes()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(remotes) == 0 {
|
||||
logrus.Debugf("cannot ensure %s is up-to-date, no git remotes configured", recipeName)
|
||||
return nil
|
||||
}
|
||||
|
||||
opts := &git.PullOptions{
|
||||
ReferenceName: plumbing.ReferenceName(branch),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue