Skip to content

Commit

Permalink
fixed sync for single repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed Feb 2, 2023
1 parent 1030f6c commit 0c0f6d5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions utils/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
)

func Sync(repoName ...string) error {
var _repoName string
if len(repoName) > 0 {
_repoName = repoName[0]
}
c := exec.Command("emerge", "--sync", _repoName)
c := exec.Command("emerge", "--sync")
c.Stdout = os.Stdout

if len(repoName) > 0 && len(repoName[0]) > 0 {
c.Args = append(c.Args, repoName[0])
}

return c.Run()
}

0 comments on commit 0c0f6d5

Please sign in to comment.