Skip to content

Commit 9cb6320

Browse files
andriusmpostmodern
authored andcommitted
Use a less ambiguous separator for the version update suggestions
1 parent 5b22bd3 commit 9cb6320

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/bundler/audit/cli/formats/junit.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def bundle_title(result)
101101

102102
def advisory_solution(advisory)
103103
unless advisory.patched_versions.empty?
104-
"upgrade to #{advisory.patched_versions.join(', ')}"
104+
"upgrade to #{advisory.patched_versions.join(' or ')}"
105105
else
106106
"remove or disable this gem until a patch is available!"
107107
end

lib/bundler/audit/cli/formats/text.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def print_advisory(gem, advisory)
105105

106106
unless advisory.patched_versions.empty?
107107
say "Solution: upgrade to ", :red
108-
say advisory.patched_versions.join(', ')
108+
say advisory.patched_versions.join(" or ")
109109
else
110110
say "Solution: ", :red
111111
say "remove or disable this gem until a patch is available!", [:red, :bold]

spec/cli/formats/junit_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241

242242
context "when Advisory#patched_versions is not empty" do
243243
it 'must print "Solution: upgrade to ..."' do
244-
expect(output).to include("Solution: upgrade to #{CGI.escapeHTML(advisory.patched_versions.join(', '))}")
244+
expect(output).to include("Solution: upgrade to #{CGI.escapeHTML(advisory.patched_versions.join(' or '))}")
245245
end
246246
end
247247

spec/cli/formats/text_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230

231231
context "when Advisory#patched_versions is not empty" do
232232
it 'must print "Solution: upgrade to ..."' do
233-
expect(output_lines).to include("Solution: upgrade to #{advisory.patched_versions.join(', ')}")
233+
expect(output_lines).to include("Solution: upgrade to #{advisory.patched_versions.join(' or ')}")
234234
end
235235
end
236236

0 commit comments

Comments
 (0)