From d372031fdcfebc91ba028afe5382ad45ec584f16 Mon Sep 17 00:00:00 2001 From: Simon Olofsson Date: Wed, 9 Oct 2019 19:33:11 +0100 Subject: [PATCH] Fix diagnostic when only keep_file is in sbin. Brew creates the keep_file itself and then complains about files in sbin. --- Library/Homebrew/diagnostic.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 3698972ebe..17079ddefc 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -424,7 +424,9 @@ module Homebrew # Don't complain about sbin not being in the path if it doesn't exist sbin = HOMEBREW_PREFIX/"sbin" - return unless sbin.directory? && !sbin.children.empty? + return unless sbin.directory? + return if sbin.children.empty? + return if sbin.children.one? && sbin.children.first.basename.to_s == ".keepme" <<~EOS Homebrew's sbin was not found in your PATH but you have installed