Merge pull request #11139 from MikeMcQuaid/quieter_settings
settings: use quieter `system_command!`
This commit is contained in:
commit
1a04490a2a
@ -1,12 +1,15 @@
|
|||||||
# typed: true
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "system_command"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
# Helper functions for reading and writing settings.
|
# Helper functions for reading and writing settings.
|
||||||
#
|
#
|
||||||
# @api private
|
# @api private
|
||||||
module Settings
|
module Settings
|
||||||
extend T::Sig
|
extend T::Sig
|
||||||
|
include SystemCommand::Mixin
|
||||||
|
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
@ -24,7 +27,7 @@ module Homebrew
|
|||||||
return unless (repo/".git/config").exist?
|
return unless (repo/".git/config").exist?
|
||||||
|
|
||||||
repo.cd do
|
repo.cd do
|
||||||
safe_system "git", "config", "--replace-all", "homebrew.#{setting}", value.to_s
|
system_command! "git", args: ["config", "--replace-all", "homebrew.#{setting}", value.to_s]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -34,7 +37,7 @@ module Homebrew
|
|||||||
return if read(setting, repo: repo).blank?
|
return if read(setting, repo: repo).blank?
|
||||||
|
|
||||||
repo.cd do
|
repo.cd do
|
||||||
safe_system "git", "config", "--unset-all", "homebrew.#{setting}"
|
system_command! "git", args: ["config", "--unset-all", "homebrew.#{setting}"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user