lib/cicd/builder/mixlib/repo/artifactory.rb in cicd-builder-0.9.50 vs lib/cicd/builder/mixlib/repo/artifactory.rb in cicd-builder-0.9.51

- old
+ new

@@ -317,16 +317,18 @@ def monitor(limit,title='Progress') raise 'Must have a block' unless block_given? thread = Thread.new(){ yield } - progressbar = ::ProgressBar.create({title: title, progress_mark: '=', starting_at: 0, total: limit, remainder_mark: '.', throttle_rate: 0.5}) + progressbar = ::ProgressBar.create({title: title, progress_mark: '=', starting_at: 0, total: limit, remainder_mark: '.', throttle_rate: 0.5}) if @logger.info? limit.times do res = thread.join(1) - progressbar.increment - progressbar.total = limit + if @logger.info? + progressbar.increment + progressbar.total = limit + end unless thread.alive? #or thread.stop? - puts '' + puts '' if @logger.info? break end end thread.kill if thread.alive? or thread.stop? end \ No newline at end of file