Skip to content

Commit

Permalink
Promote to v2.55.4 (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalbe4 authored Aug 26, 2024
1 parent dbdb1c4 commit 97c0713
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
23 changes: 9 additions & 14 deletions common/progressbar/filesprogressbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,7 @@ func (p *filesProgressBarManager) newHeadlineBar(headline string) {
}

func (p *filesProgressBarManager) SetHeadlineMsg(msg string) {
if p.headlineBar != nil {
current := p.headlineBar
p.barsRWMutex.RLock()
// First abort, then mark progress as done and finally release the lock.
defer p.barsRWMutex.RUnlock()
defer p.barsWg.Done()
defer current.Abort(true)
}
p.ClearHeadlineMsg()
// Remove emojis from non-supported terminals
msg = coreutils.RemoveEmojisIfNonSupportedTerminal(msg)
p.newHeadlineBar(msg)
Expand All @@ -280,13 +273,15 @@ func (p *filesProgressBarManager) SetHeadlineMsg(msg string) {
func (p *filesProgressBarManager) ClearHeadlineMsg() {
if p.headlineBar != nil {
p.barsRWMutex.RLock()
p.headlineBar.Abort(true)
p.barsWg.Done()
p.barsRWMutex.RUnlock()
// Wait a refresh rate to make sure the abort has finished
time.Sleep(progressbar.ProgressRefreshRate)
defer p.barsRWMutex.RUnlock()
if p.headlineBar != nil {
p.headlineBar.Abort(true)
p.barsWg.Done()
// Wait a refresh rate to make sure the abort has finished
time.Sleep(progressbar.ProgressRefreshRate)
p.headlineBar = nil
}
}
p.headlineBar = nil
}

// IncGeneralProgressTotalBy increments the general progress bar total count by given n.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/jedib0t/go-pretty/v6 v6.5.9
github.com/jfrog/build-info-go v1.9.34
github.com/jfrog/gofrog v1.7.5
github.com/jfrog/jfrog-client-go v1.44.2
github.com/jfrog/jfrog-client-go v1.45.0
github.com/magiconair/properties v1.8.7
github.com/manifoldco/promptui v0.9.0
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ github.com/jfrog/build-info-go v1.9.34 h1:bPnW58VpclbpBe/x8XEu/2BIviEOoJrJ5PkRRc
github.com/jfrog/build-info-go v1.9.34/go.mod h1:6mdtqjREK76bHNODXakqKR/+ksJ9dvfLS7H57BZtnLY=
github.com/jfrog/gofrog v1.7.5 h1:dFgtEDefJdlq9cqTRoe09RLxS5Bxbe1Ev5+E6SmZHcg=
github.com/jfrog/gofrog v1.7.5/go.mod h1:jyGiCgiqSSR7k86hcUSu67XVvmvkkgWTmPsH25wI298=
github.com/jfrog/jfrog-client-go v1.44.2 h1:5t8tx6NOth6Xq24SdF3MYSd6vo0bTibW93nads2DEuY=
github.com/jfrog/jfrog-client-go v1.44.2/go.mod h1:f5Jfv+RGKVr4smOp4a4pxyBKdlpLG7R894kx2XW+w8c=
github.com/jfrog/jfrog-client-go v1.45.0 h1:CX+xlMdcvnG509PExwqJ17hzwVtFfkpeCyeKmDKKRNY=
github.com/jfrog/jfrog-client-go v1.45.0/go.mod h1:f5Jfv+RGKVr4smOp4a4pxyBKdlpLG7R894kx2XW+w8c=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
Expand Down

0 comments on commit 97c0713

Please sign in to comment.