aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/install.rb
diff options
context:
space:
mode:
authorJack Nagel2015-01-15 23:59:55 -0500
committerJack Nagel2015-01-16 00:00:21 -0500
commit28d1b4b6f77ab77107d2a83c81945a07316da2db (patch)
tree08aaf1020d036630e5858aa5549b95cdafe01846 /Library/Homebrew/cmd/install.rb
parentacadadff42a30012fe59046ae6486041d695e62c (diff)
downloadhomebrew-28d1b4b6f77ab77107d2a83c81945a07316da2db.tar.bz2
install: fix --HEAD for formulae with head and devel but no stable
Diffstat (limited to 'Library/Homebrew/cmd/install.rb')
-rw-r--r--Library/Homebrew/cmd/install.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index 14bf24b50..1fb5a2f0e 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -49,15 +49,15 @@ module Homebrew
end
# devel-only without --devel is an error
- if not ARGV.build_devel? and f.stable.nil?
- if f.head.nil?
- raise <<-EOS.undent
- #{f.name} is a devel-only formula
- Install with `brew install --devel #{f.name}`
- EOS
- else
- raise "#{f.name} has no stable download, please choose --devel or --HEAD"
- end
+ if not ARGV.build_devel? and f.stable.nil? and f.head.nil?
+ raise <<-EOS.undent
+ #{f.name} is a devel-only formula
+ Install with `brew install --devel #{f.name}`
+ EOS
+ end
+
+ if ARGV.build_stable? and f.stable.nil?
+ raise "#{f.name} has no stable download, please choose --devel or --HEAD"
end
# --HEAD, fail with no head defined