install: create .keepme files in directories.

This commit is contained in:
Ivan Verevkin 2019-09-17 11:06:48 +02:00 committed by Mike McQuaid
parent 5356ebb20a
commit 878b79d456
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -24,6 +24,9 @@ module Homebrew
Keg::MUST_EXIST_DIRECTORIES.each do |dir|
begin
FileUtils.mkdir_p(dir) unless dir.exist?
keep_file = "#{dir}/.keepme"
FileUtils.touch(keep_file) unless keep_file.exist?
rescue
nil
end