Skip to content

Commit 0f92fd7

Browse files
authored
Merge pull request #20283 from Homebrew/skip-concurrent-fetch-fix-tests
Fix some stdout issues with concurrence
2 parents 89f510a + d436381 commit 0f92fd7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Library/Homebrew/download_queue.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ def enqueue(downloadable)
3636

3737
sig { void }
3838
def fetch
39-
if concurrency == 1
39+
return if downloads.empty?
40+
41+
if concurrency == 1 || downloads.one?
4042
downloads.each do |downloadable, promise|
4143
promise.wait!
4244
rescue ChecksumMismatchError => e

Library/Homebrew/test/cmd/install_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def install
6767
# Ignore dependencies, because we'll try to resolve requirements in build.rb
6868
# and there will be the git requirement, but we cannot instantiate git
6969
# formula since we only have testball1 formula.
70-
expect { brew "install", "testball1", "--HEAD", "--ignore-dependencies" }
70+
expect { brew "install", "testball1", "--HEAD", "--ignore-dependencies", "HOMEBREW_DOWNLOAD_CONCURRENCY" => "1" }
7171
.to output(%r{#{HOMEBREW_CELLAR}/testball1/HEAD-d5eb689}o).to_stdout
7272
.and output(/Cloning into/).to_stderr
7373
.and be_a_success

0 commit comments

Comments
 (0)