diff --git a/repo.go b/repo.go index 94ee0dd4..9044c14a 100644 --- a/repo.go +++ b/repo.go @@ -111,6 +111,10 @@ func (repo *Repo) audit() (bool, error) { } } else { log.Printf("fetching \x1b[37;1m%s\x1b[0m from %s ...\n", repo.name, repo.path) + err = os.Chdir(fmt.Sprintf(repo.path)) + if err != nil { + return false, fmt.Errorf("cannot navigate to %s", repo.path) + } err = exec.Command("git", "fetch").Run() if err != nil { return false, fmt.Errorf("cannot fetch %s from %s", repo.url, repo.path)