feat: small fix
This commit is contained in:
parent
c7b618475b
commit
ec230004e4
1 changed files with 3 additions and 6 deletions
|
|
@ -62,9 +62,7 @@ func fetchRepositories() ([]Repository, error) {
|
||||||
func checkoutRepositories(repositories []Repository) {
|
func checkoutRepositories(repositories []Repository) {
|
||||||
repoCount := len(repositories)
|
repoCount := len(repositories)
|
||||||
|
|
||||||
// make progressbar using:
|
// make progressbar
|
||||||
// - github.com/k0kubun/go-ansi
|
|
||||||
// - github.com/schollz/progressbar/v3
|
|
||||||
barPrefix := fmt.Sprintf("Getting your one and only repository...")
|
barPrefix := fmt.Sprintf("Getting your one and only repository...")
|
||||||
if repoCount > 1 {
|
if repoCount > 1 {
|
||||||
barPrefix = fmt.Sprintf("Getting your repositories...")
|
barPrefix = fmt.Sprintf("Getting your repositories...")
|
||||||
|
|
@ -108,7 +106,7 @@ func checkoutRepositories(repositories []Repository) {
|
||||||
bar.Add(1)
|
bar.Add(1)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Printf("❌ Error cloning %s: %v\n%s", repoName, err, string(cloneOutput))
|
log.Printf("❌ error cloning %s: %v\n%s", repoName, err, string(cloneOutput))
|
||||||
bar.Add(1)
|
bar.Add(1)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
@ -124,8 +122,7 @@ func pullRepositories(repoDestination string) {
|
||||||
pullOutput, err := pullCmd.CombinedOutput()
|
pullOutput, err := pullCmd.CombinedOutput()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if strings.Contains(string(pullOutput),
|
if strings.Contains(string(pullOutput), "You have unstaged changes") {
|
||||||
"You have unstaged changes") {
|
|
||||||
pullError = append(pullError, repoDestination)
|
pullError = append(pullError, repoDestination)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue