refactor: apkupdater: Lock on only critical section

This commit is contained in:
HeshamTB 2023-09-22 01:31:49 +03:00
parent fb405dc55c
commit 3941d4761d
1 changed files with 1 additions and 1 deletions

View File

@ -60,9 +60,9 @@ type AlpineLinuxPackageUpdate struct {
func (u *AlpineLinuxPackageUpdate) Update() {
u.apkLock.Lock()
log.Println("Updating packages...")
cmd := exec.Command("apk", u.Packages...)
u.apkLock.Lock()
stdout, err := cmd.Output()
u.apkLock.Unlock()
if err != nil {