diff options
Diffstat (limited to 'Library/Homebrew/cmd/fetch.rb')
| -rw-r--r-- | Library/Homebrew/cmd/fetch.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 5ac41a4d3..171218294 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -32,6 +32,13 @@ module Homebrew def fetch_bottle? f return true if ARGV.force_bottle? && f.bottle return false unless f.bottle && f.pour_bottle? + if f.file_modified? + filename = f.path.to_s.gsub("#{HOMEBREW_PREFIX}/", "") + opoo "Formula file is modified!" + puts "Fetching source because #{filename} has local changes" + puts "To fetch the bottle instead, run with --force-bottle" + return false + end return false if ARGV.build_from_source? || ARGV.build_bottle? return false unless f.bottle.compatible_cellar? return true |
