From 853421e968eed87dc58e7ac2491b0d45f171c29e Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Tue, 7 Feb 2023 23:45:09 +0900 Subject: [PATCH] repair setup_tar_and_args! method --- Library/Homebrew/dev-cmd/bottle.rb | 3 +-- Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb | 3 ++- Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index f12609bafe..0b2d6f18c4 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -236,8 +236,7 @@ module Homebrew def setup_tar_and_args!(args, _mtime) # Without --only-json-tab bottles are never reproducible - default_tar_args = ["tar", [].freeze].freeze - return default_tar_args unless args.only_json_tab? + ["tar", [].freeze].freeze end alias generic_setup_tar_and_args! setup_tar_and_args! diff --git a/Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb b/Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb index 13d5e5e9cb..b1d6afe18b 100644 --- a/Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb +++ b/Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb @@ -7,7 +7,8 @@ module Homebrew module_function def setup_tar_and_args!(args, mtime) - generic_setup_tar_and_args!(args, mtime) + default_tar_args = generic_setup_tar_and_args!(args, mtime) + return default_tar_args unless args.only_json_tab? ["tar", gnutar_args(mtime)].freeze end diff --git a/Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb b/Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb index 752ea0c6e5..d81f7fd824 100644 --- a/Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb +++ b/Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb @@ -7,7 +7,8 @@ module Homebrew module_function def setup_tar_and_args!(args, mtime) - generic_setup_tar_and_args!(args, mtime) + default_tar_args = generic_setup_tar_and_args!(args, mtime) + return default_tar_args unless args.only_json_tab? # Use gnu-tar on macOS as it can be set up for reproducibility better than libarchive. begin