aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorWilliam Roe2017-03-27 11:30:36 +0100
committerWilliam Roe2017-03-27 11:30:36 +0100
commit70446d9112c0d42ca1ab469af07716bb7281169e (patch)
treed934afd66f725cc0db6d61291317514e76ad7d8a /Library
parent755d43d46dc20b9e646909e08de482141de83777 (diff)
downloadbrew-70446d9112c0d42ca1ab469af07716bb7281169e.tar.bz2
Add pinned version to outdated output
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/outdated.rb4
-rw-r--r--Library/Homebrew/test/cmd/outdated_spec.rb16
2 files changed, 19 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb
index a18f4e399..a576162a0 100644
--- a/Library/Homebrew/cmd/outdated.rb
+++ b/Library/Homebrew/cmd/outdated.rb
@@ -64,7 +64,9 @@ module Homebrew
"#{full_name} (#{kegs.map(&:version).join(", ")})"
end.join(", ")
- puts "#{outdated_versions} < #{current_version}"
+ pinned_version = " [pinned at #{f.pinned_version}]" if f.pinned?
+
+ puts "#{outdated_versions} < #{current_version}#{pinned_version}"
else
puts f.full_installed_specified_name
end
diff --git a/Library/Homebrew/test/cmd/outdated_spec.rb b/Library/Homebrew/test/cmd/outdated_spec.rb
index 8e53d84ee..a7d56efb5 100644
--- a/Library/Homebrew/test/cmd/outdated_spec.rb
+++ b/Library/Homebrew/test/cmd/outdated_spec.rb
@@ -22,4 +22,20 @@ describe "brew outdated", :integration_test do
.and be_a_success
end
end
+
+ context "pinned formula, verbose output" do
+ it "prints out the pinned version" do
+ setup_test_formula "testball"
+ (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
+
+ shutup do
+ expect { brew "pin", "testball" }.to be_a_success
+ end
+
+ expect { brew "outdated", "--verbose" }
+ .to output("testball (0.0.1) < 0.1 [pinned at 0.0.1]\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+ end
end