Skip to content

Commit

Permalink
fix: fix CR comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
zong-zhe committed Jul 18, 2023
1 parent 15b3bb9 commit 959db7d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ func (settings *Settings) AcquirePackageCacheLock() error {
if err != nil {
return err
}
firstTry := true

// if failed to lock the 'package-cache' file, wait until it is unlocked.
if !locked {
reporter.Report("kpm: waiting for package-cache lock...")
for {
// try to lock the 'package-cache' file
locked, err = settings.PackageCacheLock.TryLock()
if err != nil && firstTry {
reporter.Report("kpm: waiting for package-cache lock...")
firstTry = false
if err != nil {
return err
}
// if locked, break the loop.
if locked {
Expand Down

0 comments on commit 959db7d

Please sign in to comment.