From 590f06187f252bc7e03874bc51bfeb1ebcd5a139 Mon Sep 17 00:00:00 2001 From: Jayendra Minakshisundar Date: Fri, 27 Oct 2017 11:38:37 +0530 Subject: [PATCH 1/2] tap-info: sort taps by name to handle APFS --- Library/Homebrew/cmd/tap-info.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb index d01ce8a027..06ba335d82 100644 --- a/Library/Homebrew/cmd/tap-info.rb +++ b/Library/Homebrew/cmd/tap-info.rb @@ -21,7 +21,6 @@ module Homebrew module_function def tap_info - # TODO: This still returns a non-alphabetised list on APFS. if ARGV.include? "--installed" taps = Tap else @@ -31,9 +30,9 @@ module Homebrew end if ARGV.json == "v1" - print_tap_json(taps) + print_tap_json(taps.sort_by {|tap| tap.to_s}) else - print_tap_info(taps) + print_tap_info(taps.sort_by {|tap| tap.to_s}) end end From ea7d356e08e9a54efca82bd90e5caf925c179d3d Mon Sep 17 00:00:00 2001 From: Jayendra Minakshisundar Date: Sat, 28 Oct 2017 14:56:51 +0530 Subject: [PATCH 2/2] style changes --- Library/Homebrew/cmd/tap-info.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb index 06ba335d82..3d995f4bcb 100644 --- a/Library/Homebrew/cmd/tap-info.rb +++ b/Library/Homebrew/cmd/tap-info.rb @@ -30,9 +30,9 @@ module Homebrew end if ARGV.json == "v1" - print_tap_json(taps.sort_by {|tap| tap.to_s}) + print_tap_json(taps.sort_by(&:to_s)) else - print_tap_info(taps.sort_by {|tap| tap.to_s}) + print_tap_info(taps.sort_by(&:to_s)) end end