aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/install.rb
diff options
context:
space:
mode:
authorMike McQuaid2017-04-02 17:02:56 +0100
committerMike McQuaid2017-04-02 17:02:56 +0100
commit879b3360d3c664750dd90571f898c349e21442fb (patch)
tree34b8fb4071c8df6791d1309a3e0cc082bbfec0df /Library/Homebrew/cmd/install.rb
parent081461a268f02aafa0753b6391e5129c929259c9 (diff)
downloadbrew-879b3360d3c664750dd90571f898c349e21442fb.tar.bz2
Handle missing receipt on `brew install`.
For example if this is for a really old keg, keg where a user has manually removed stuff or used `brew diy`.
Diffstat (limited to 'Library/Homebrew/cmd/install.rb')
-rw-r--r--Library/Homebrew/cmd/install.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index a32f2ef34..1808c4d9c 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -194,8 +194,10 @@ module Homebrew
next unless f.opt_prefix.directory?
keg = Keg.new(f.opt_prefix.resolved_path)
tab = Tab.for_keg(keg)
- tab.installed_on_request = true
- tab.write
+ unless tab.installed_on_request
+ tab.installed_on_request = true
+ tab.write
+ end
end
perform_preinstall_checks