aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/pull.rb
diff options
context:
space:
mode:
authorMarkus Reiter2016-09-23 17:17:49 +0200
committerGitHub2016-09-23 17:17:49 +0200
commit246bb1a3b18cf41c2499cc78b7eac8fab503c5d6 (patch)
tree24c62806b60d59b0f9a689ac693a7afec5bd3291 /Library/Homebrew/dev-cmd/pull.rb
parent4cbeb1e981e974474a0d37c120ffa18e13ac3db9 (diff)
parentfe2d51e0b9d4d9c138e512c245b1ed8d0f1dbf53 (diff)
downloadbrew-246bb1a3b18cf41c2499cc78b7eac8fab503c5d6.tar.bz2
Merge pull request #1050 from reitermarkus/rubocop
RuboCop changes.
Diffstat (limited to 'Library/Homebrew/dev-cmd/pull.rb')
-rw-r--r--Library/Homebrew/dev-cmd/pull.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb
index 7f027e159..b06719fb1 100644
--- a/Library/Homebrew/dev-cmd/pull.rb
+++ b/Library/Homebrew/dev-cmd/pull.rb
@@ -41,12 +41,12 @@ require "pkg_version"
module Homebrew
def pull
- if ARGV[0] == "--rebase"
- odie "You meant `git pull --rebase`."
- end
+ odie "You meant `git pull --rebase`." if ARGV[0] == "--rebase"
+
if ARGV.named.empty?
odie "This command requires at least one argument containing a URL or pull request number"
end
+
do_bump = ARGV.include?("--bump") && !ARGV.include?("--clean")
# Formulae with affected bottles that were published
@@ -429,9 +429,9 @@ module Homebrew
# Returns nil if formula is absent or if there was an error reading it
def self.lookup(name)
json = Utils.popen_read(HOMEBREW_BREW_FILE, "info", "--json=v1", name)
- unless $?.success?
- return nil
- end
+
+ return nil unless $?.success?
+
Homebrew.force_utf8!(json)
FormulaInfoFromJson.new(Utils::JSON.load(json)[0])
end