aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/list.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb
index b35b0e389..0ebe5f578 100644
--- a/Library/Homebrew/cmd/list.rb
+++ b/Library/Homebrew/cmd/list.rb
@@ -61,9 +61,10 @@ module Homebrew
dirs = HOMEBREW_PREFIX.subdirs.map { |dir| dir.basename.to_s }
dirs -= %w[Library Cellar .git]
- # Exclude the repository and cache, if they are located under the prefix
- dirs.delete HOMEBREW_CACHE.relative_path_from(HOMEBREW_PREFIX).to_s
- dirs.delete HOMEBREW_REPOSITORY.relative_path_from(HOMEBREW_PREFIX).to_s
+ # Exclude cache, logs, and repository, if they are located under the prefix.
+ [HOMEBREW_CACHE, HOMEBREW_LOGS, HOMEBREW_REPOSITORY].each do |dir|
+ dirs.delete dir.relative_path_from(HOMEBREW_PREFIX).to_s
+ end
dirs.delete "etc"
dirs.delete "var"