summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2012-12-10 22:35:32 -0800
committerAndre Arko <andre@arko.net>2012-12-10 22:35:32 -0800
commit54046a00a84bacc96b913c456d2cef131d03a6aa (patch)
tree32b6e41b02f985f482fcfd96e9771f9abd21623f
parent865cc75c06889804ac43cacc394fe516b58d7f39 (diff)
downloadbundler-54046a00a84bacc96b913c456d2cef131d03a6aa.tar.gz
exit 1 if gems are outdated
-rw-r--r--lib/bundler/cli.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 0182e983c7..13dcd6c802 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -334,8 +334,8 @@ module Bundler
long_desc <<-D
Outdated lists the names and versions of gems that have a newer version available
in the given source. Calling outdated with [GEM [GEM]] will only check for newer
- versions of the given gems. By default, available prerelease gems will be ignored.
- If outdated gems are found then the exit status is set to 300.
+ versions of the given gems. Prerelease gems are ignored by default. If your gems
+ are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
D
method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
method_option "source", :type => :array, :banner => "Check against a specific source"
@@ -389,9 +389,11 @@ module Bundler
Bundler.ui.debug "from #{active_spec.loaded_from}"
end
- Bundler.ui.info "Your bundle is up to date!" if out_count < 1
- Bundler.ui.info ""
- exit 300 if out_count >= 1
+ if out_count.zero?
+ Bundler.ui.info "Your bundle is up to date!\n"
+ else
+ exit 1
+ end
end
desc "cache", "Cache all the gems to vendor/cache", :hide => true