Fixup brew style
failures.
This commit is contained in:
parent
738f4689a5
commit
c4f72312ce
@ -72,7 +72,7 @@ begin
|
||||
if internal_dev_cmd && !ARGV.homebrew_developer?
|
||||
if (HOMEBREW_REPOSITORY/".git/config").exist?
|
||||
system "git", "config", "--file=#{HOMEBREW_REPOSITORY}/.git/config",
|
||||
"--replace-all", "homebrew.devcmdrun", "true"
|
||||
"--replace-all", "homebrew.devcmdrun", "true"
|
||||
end
|
||||
ENV["HOMEBREW_DEV_CMD_RUN"] = "1"
|
||||
end
|
||||
|
@ -62,8 +62,8 @@ module Cask
|
||||
|
||||
odebug "Adding #{ALT_NAME_ATTRIBUTE} metadata"
|
||||
altnames = command.run("/usr/bin/xattr",
|
||||
args: ["-p", ALT_NAME_ATTRIBUTE, file],
|
||||
print_stderr: false).stdout.sub(/\A\((.*)\)\Z/, '\1')
|
||||
args: ["-p", ALT_NAME_ATTRIBUTE, file],
|
||||
print_stderr: false).stdout.sub(/\A\((.*)\)\Z/, '\1')
|
||||
odebug "Existing metadata is: '#{altnames}'"
|
||||
altnames.concat(", ") unless altnames.empty?
|
||||
altnames.concat(%Q("#{altname}"))
|
||||
@ -73,8 +73,8 @@ module Cask
|
||||
command.run!("/bin/chmod", args: ["--", "u+rw", file, file.realpath])
|
||||
|
||||
command.run!("/usr/bin/xattr",
|
||||
args: ["-w", ALT_NAME_ATTRIBUTE, altnames, file],
|
||||
print_stderr: false)
|
||||
args: ["-w", ALT_NAME_ATTRIBUTE, altnames, file],
|
||||
print_stderr: false)
|
||||
end
|
||||
|
||||
def printable_target
|
||||
|
@ -40,14 +40,14 @@ module Cask
|
||||
def link(**options)
|
||||
unless source.exist?
|
||||
raise CaskError,
|
||||
"It seems the #{self.class.link_type_english_name.downcase} " \
|
||||
"source '#{source}' is not there."
|
||||
"It seems the #{self.class.link_type_english_name.downcase} " \
|
||||
"source '#{source}' is not there."
|
||||
end
|
||||
|
||||
if target.exist? && !target.symlink?
|
||||
raise CaskError,
|
||||
"It seems there is already #{self.class.english_article} " \
|
||||
"#{self.class.english_name} at '#{target}'; not linking."
|
||||
"It seems there is already #{self.class.english_article} " \
|
||||
"#{self.class.english_name} at '#{target}'; not linking."
|
||||
end
|
||||
|
||||
ohai "Linking #{self.class.english_name} '#{source.basename}' to '#{target}'."
|
||||
|
@ -49,10 +49,10 @@ module Cask
|
||||
return if DSL::DSL_METHODS.include?(stanza)
|
||||
|
||||
raise ArgumentError,
|
||||
<<~EOS
|
||||
Unknown/unsupported stanza: '#{stanza}'
|
||||
Check Cask reference for supported stanzas.
|
||||
EOS
|
||||
<<~EOS
|
||||
Unknown/unsupported stanza: '#{stanza}'
|
||||
Check Cask reference for supported stanzas.
|
||||
EOS
|
||||
end
|
||||
|
||||
def run
|
||||
|
@ -258,22 +258,22 @@ module Cask
|
||||
operator, release = @cask.depends_on.macos.first
|
||||
unless MacOS.version.send(operator, release)
|
||||
raise CaskError,
|
||||
"Cask #{@cask} depends on macOS release #{operator} #{release}, " \
|
||||
"but you are running release #{MacOS.version}."
|
||||
"Cask #{@cask} depends on macOS release #{operator} #{release}, " \
|
||||
"but you are running release #{MacOS.version}."
|
||||
end
|
||||
elsif @cask.depends_on.macos.length > 1
|
||||
unless @cask.depends_on.macos.include?(Gem::Version.new(MacOS.version.to_s))
|
||||
raise CaskError,
|
||||
"Cask #{@cask} depends on macOS release being one of " \
|
||||
"[#{@cask.depends_on.macos.map(&:to_s).join(", ")}], " \
|
||||
"but you are running release #{MacOS.version}."
|
||||
"Cask #{@cask} depends on macOS release being one of " \
|
||||
"[#{@cask.depends_on.macos.map(&:to_s).join(", ")}], " \
|
||||
"but you are running release #{MacOS.version}."
|
||||
end
|
||||
else
|
||||
unless MacOS.version == @cask.depends_on.macos.first
|
||||
raise CaskError,
|
||||
"Cask #{@cask} depends on macOS release " \
|
||||
"#{@cask.depends_on.macos.first}, " \
|
||||
"but you are running release #{MacOS.version}."
|
||||
"Cask #{@cask} depends on macOS release " \
|
||||
"#{@cask.depends_on.macos.first}, " \
|
||||
"but you are running release #{MacOS.version}."
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -288,9 +288,9 @@ module Cask
|
||||
end
|
||||
|
||||
raise CaskError,
|
||||
"Cask #{@cask} depends on hardware architecture being one of " \
|
||||
"[#{@cask.depends_on.arch.map(&:to_s).join(", ")}], " \
|
||||
"but you are running #{@current_arch}"
|
||||
"Cask #{@cask} depends on hardware architecture being one of " \
|
||||
"[#{@cask.depends_on.arch.map(&:to_s).join(", ")}], " \
|
||||
"but you are running #{@current_arch}"
|
||||
end
|
||||
|
||||
def x11_dependencies
|
||||
|
@ -385,8 +385,8 @@ module Homebrew
|
||||
end
|
||||
dirs.select(&:directory?).each do |dir|
|
||||
system_command "find",
|
||||
args: [dir, "-name", ".DS_Store", "-delete"],
|
||||
print_stderr: false
|
||||
args: [dir, "-name", ".DS_Store", "-delete"],
|
||||
print_stderr: false
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -16,9 +16,9 @@ module Homebrew
|
||||
If <formula> is provided, display the file or directory used to cache <formula>.
|
||||
EOS
|
||||
switch "-s", "--build-from-source",
|
||||
description: "Show the cache file used when building from source."
|
||||
description: "Show the cache file used when building from source."
|
||||
switch "--force-bottle",
|
||||
description: "Show the cache file used when pouring a bottle."
|
||||
description: "Show the cache file used when pouring a bottle."
|
||||
conflicts "--build-from-source", "--force-bottle"
|
||||
end
|
||||
end
|
||||
|
@ -19,10 +19,10 @@ module Homebrew
|
||||
the list is formatted for export to `bash`(1) unless `--plain` is passed.
|
||||
EOS
|
||||
flag "--shell=",
|
||||
description: "Generate a list of environment variables for the specified shell, " \
|
||||
"or `--shell=auto` to detect the current shell."
|
||||
description: "Generate a list of environment variables for the specified shell, " \
|
||||
"or `--shell=auto` to detect the current shell."
|
||||
switch "--plain",
|
||||
description: "Plain output even when piped."
|
||||
description: "Plain output even when piped."
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -44,12 +44,12 @@ module Homebrew
|
||||
end
|
||||
when "on"
|
||||
safe_system "git", "config", "--file=#{config_file}",
|
||||
"--replace-all", "homebrew.analyticsdisabled", "false"
|
||||
"--replace-all", "homebrew.analyticsdisabled", "false"
|
||||
safe_system "git", "config", "--file=#{config_file}",
|
||||
"--replace-all", "homebrew.analyticsmessage", "true"
|
||||
"--replace-all", "homebrew.analyticsmessage", "true"
|
||||
when "off"
|
||||
safe_system "git", "config", "--file=#{config_file}",
|
||||
"--replace-all", "homebrew.analyticsdisabled", "true"
|
||||
"--replace-all", "homebrew.analyticsdisabled", "true"
|
||||
system "git", "config", "--file=#{config_file}", "--unset-all", "homebrew.analyticsuuid"
|
||||
when "regenerate-uuid"
|
||||
# it will be regenerated in next run.
|
||||
|
@ -17,15 +17,15 @@ module Homebrew
|
||||
EOS
|
||||
|
||||
flag "--prune=",
|
||||
description: "Remove all cache files older than specified <days>."
|
||||
description: "Remove all cache files older than specified <days>."
|
||||
switch "-n", "--dry-run",
|
||||
description: "Show what would be removed, but do not actually remove anything."
|
||||
description: "Show what would be removed, but do not actually remove anything."
|
||||
switch "-s",
|
||||
description: "Scrub the cache, including downloads for even the latest versions. "\
|
||||
"Note downloads for any installed formula or cask will still not be deleted. "\
|
||||
"If you want to delete those too: `rm -rf \"$(brew --cache)\"`"
|
||||
description: "Scrub the cache, including downloads for even the latest versions. "\
|
||||
"Note downloads for any installed formula or cask will still not be deleted. "\
|
||||
"If you want to delete those too: `rm -rf \"$(brew --cache)\"`"
|
||||
switch "--prune-prefix",
|
||||
description: "Only prune the symlinks and directories from the prefix and remove no other files."
|
||||
description: "Only prune the symlinks and directories from the prefix and remove no other files."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -13,10 +13,10 @@ module Homebrew
|
||||
Show a list of built-in and external commands.
|
||||
EOS
|
||||
switch "--quiet",
|
||||
description: "List only the names of commands without the header."
|
||||
description: "List only the names of commands without the header."
|
||||
switch "--include-aliases",
|
||||
depends_on: "--quiet",
|
||||
description: "Include the aliases of internal commands."
|
||||
depends_on: "--quiet",
|
||||
description: "Include the aliases of internal commands."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -17,38 +17,38 @@ module Homebrew
|
||||
show the intersection of dependencies for each formula.
|
||||
EOS
|
||||
switch "-n",
|
||||
description: "Show dependencies in topological order."
|
||||
description: "Show dependencies in topological order."
|
||||
switch "--1",
|
||||
description: "Only show dependencies one level down, instead of recursing."
|
||||
description: "Only show dependencies one level down, instead of recursing."
|
||||
switch "--union",
|
||||
description: "Show the union of dependencies for multiple <formula>, instead of the intersection."
|
||||
description: "Show the union of dependencies for multiple <formula>, instead of the intersection."
|
||||
switch "--full-name",
|
||||
description: "List dependencies by their full name."
|
||||
description: "List dependencies by their full name."
|
||||
switch "--include-build",
|
||||
description: "Include `:build` dependencies for <formula>."
|
||||
description: "Include `:build` dependencies for <formula>."
|
||||
switch "--include-optional",
|
||||
description: "Include `:optional` dependencies for <formula>."
|
||||
description: "Include `:optional` dependencies for <formula>."
|
||||
switch "--include-test",
|
||||
description: "Include `:test` dependencies for <formula> (non-recursive)."
|
||||
description: "Include `:test` dependencies for <formula> (non-recursive)."
|
||||
switch "--skip-recommended",
|
||||
description: "Skip `:recommended` dependencies for <formula>."
|
||||
description: "Skip `:recommended` dependencies for <formula>."
|
||||
switch "--include-requirements",
|
||||
description: "Include requirements in addition to dependencies for <formula>."
|
||||
description: "Include requirements in addition to dependencies for <formula>."
|
||||
switch "--tree",
|
||||
description: "Show dependencies as a tree. When given multiple formula arguments, "\
|
||||
"show individual trees for each formula."
|
||||
description: "Show dependencies as a tree. When given multiple formula arguments, "\
|
||||
"show individual trees for each formula."
|
||||
switch "--annotate",
|
||||
description: "Mark any build, test, optional, or recommended dependencies as "\
|
||||
"such in the output."
|
||||
description: "Mark any build, test, optional, or recommended dependencies as "\
|
||||
"such in the output."
|
||||
switch "--installed",
|
||||
description: "List dependencies for formulae that are currently installed. If <formula> is "\
|
||||
"specified, list only its dependencies that are currently installed."
|
||||
description: "List dependencies for formulae that are currently installed. If <formula> is "\
|
||||
"specified, list only its dependencies that are currently installed."
|
||||
switch "--all",
|
||||
description: "List dependencies for all available formulae."
|
||||
description: "List dependencies for all available formulae."
|
||||
switch "--for-each",
|
||||
description: "Switch into the mode used by the `--all` option, but only list dependencies "\
|
||||
"for the specified <formula>, one formula per line. This is used for "\
|
||||
"debugging the `--installed`/`--all` display mode."
|
||||
description: "Switch into the mode used by the `--all` option, but only list dependencies "\
|
||||
"for the specified <formula>, one formula per line. This is used for "\
|
||||
"debugging the `--installed`/`--all` display mode."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
conflicts "--installed", "--all"
|
||||
|
@ -20,14 +20,14 @@ module Homebrew
|
||||
first search, making that search slower than subsequent ones.
|
||||
EOS
|
||||
flag "-s", "--search=",
|
||||
description: "Search both name and description for provided <text>. If <text> is flanked by "\
|
||||
"slashes, it is interpreted as a regular expression."
|
||||
description: "Search both name and description for provided <text>. If <text> is flanked by "\
|
||||
"slashes, it is interpreted as a regular expression."
|
||||
flag "-n", "--name=",
|
||||
description: "Search just the names for provided <text>. If <text> is flanked by slashes, it is "\
|
||||
"interpreted as a regular expression."
|
||||
description: "Search just the names for provided <text>. If <text> is flanked by slashes, it is "\
|
||||
"interpreted as a regular expression."
|
||||
flag "-d", "--description=",
|
||||
description: "Search just the descriptions for provided <text>. If <text> is flanked by slashes, "\
|
||||
"it is interpreted as a regular expression."
|
||||
description: "Search just the descriptions for provided <text>. If <text> is flanked by slashes, "\
|
||||
"it is interpreted as a regular expression."
|
||||
switch :verbose
|
||||
conflicts "--search=", "--name=", "--description="
|
||||
end
|
||||
|
@ -16,9 +16,9 @@ module Homebrew
|
||||
the Cellar and then link it into Homebrew's prefix with `brew link`.
|
||||
EOS
|
||||
flag "--name=",
|
||||
description: "Explicitly set the provided <name> of the package being installed."
|
||||
description: "Explicitly set the provided <name> of the package being installed."
|
||||
flag "--version=",
|
||||
description: "Explicitly set the provided <version> of the package being installed."
|
||||
description: "Explicitly set the provided <version> of the package being installed."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -18,9 +18,9 @@ module Homebrew
|
||||
an issue; just ignore this.
|
||||
EOS
|
||||
switch "--list-checks",
|
||||
description: "List all audit methods."
|
||||
description: "List all audit methods."
|
||||
switch "-D", "--audit-debug",
|
||||
description: "Enable debugging and profiling of audit methods."
|
||||
description: "Enable debugging and profiling of audit methods."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -16,26 +16,26 @@ module Homebrew
|
||||
For tarballs, also print SHA-256 checksums.
|
||||
EOS
|
||||
switch "--HEAD",
|
||||
description: "Fetch HEAD version instead of stable version."
|
||||
description: "Fetch HEAD version instead of stable version."
|
||||
switch "--devel",
|
||||
description: "Fetch development version instead of stable version."
|
||||
description: "Fetch development version instead of stable version."
|
||||
switch :verbose,
|
||||
description: "Do a verbose VCS checkout, if the URL represents a VCS. This is useful for "\
|
||||
"seeing if an existing VCS cache has been updated."
|
||||
description: "Do a verbose VCS checkout, if the URL represents a VCS. This is useful for "\
|
||||
"seeing if an existing VCS cache has been updated."
|
||||
switch :force,
|
||||
description: "Remove a previously cached version and re-fetch."
|
||||
description: "Remove a previously cached version and re-fetch."
|
||||
switch "--retry",
|
||||
description: "Retry if a download fails or re-download if the checksum of a previously cached "\
|
||||
"version no longer matches."
|
||||
description: "Retry if a download fails or re-download if the checksum of a previously cached "\
|
||||
"version no longer matches."
|
||||
switch "--deps",
|
||||
description: "Download dependencies for any listed <formula>."
|
||||
description: "Download dependencies for any listed <formula>."
|
||||
switch "-s", "--build-from-source",
|
||||
description: "Download the source for rather than a bottle."
|
||||
description: "Download the source for rather than a bottle."
|
||||
switch "--build-bottle",
|
||||
description: "Download the source (for eventual bottling) rather than a bottle."
|
||||
description: "Download the source (for eventual bottling) rather than a bottle."
|
||||
switch "--force-bottle",
|
||||
description: "Download a bottle if it exists for the current or newest version of macOS, "\
|
||||
"even if it would not be used during installation."
|
||||
description: "Download a bottle if it exists for the current or newest version of macOS, "\
|
||||
"even if it would not be used during installation."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
conflicts "--devel", "--HEAD"
|
||||
|
@ -23,13 +23,13 @@ module Homebrew
|
||||
If no logs are found, an error message is presented.
|
||||
EOS
|
||||
switch "--with-hostname",
|
||||
description: "Include the hostname in the Gist."
|
||||
description: "Include the hostname in the Gist."
|
||||
switch "-n", "--new-issue",
|
||||
description: "Automatically create a new issue in the appropriate GitHub repository as "\
|
||||
"well as creating the Gist."
|
||||
description: "Automatically create a new issue in the appropriate GitHub repository as "\
|
||||
"well as creating the Gist."
|
||||
switch "-p", "--private",
|
||||
description: "The Gist will be marked private and will not appear in listings but will "\
|
||||
"be accessible with the link."
|
||||
description: "The Gist will be marked private and will not appear in listings but will "\
|
||||
"be accessible with the link."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -22,33 +22,33 @@ module Homebrew
|
||||
If <formula> is specified, show summary of information about <formula>.
|
||||
EOS
|
||||
switch "--analytics",
|
||||
description: "Display global Homebrew analytics data or, if specified, installation and "\
|
||||
"build error data for <formula> (provided neither `HOMEBREW_NO_ANALYTICS` "\
|
||||
"nor `HOMEBREW_NO_GITHUB_API` are set)."
|
||||
description: "Display global Homebrew analytics data or, if specified, installation and "\
|
||||
"build error data for <formula> (provided neither `HOMEBREW_NO_ANALYTICS` "\
|
||||
"nor `HOMEBREW_NO_GITHUB_API` are set)."
|
||||
flag "--days",
|
||||
depends_on: "--analytics",
|
||||
description: "How many days of global analytics data to retrieve. "\
|
||||
"The value for <days> must be `30`, `90` or `365`. The default is `30`."
|
||||
depends_on: "--analytics",
|
||||
description: "How many days of global analytics data to retrieve. "\
|
||||
"The value for <days> must be `30`, `90` or `365`. The default is `30`."
|
||||
flag "--category",
|
||||
depends_on: "--analytics",
|
||||
description: "Which type of global analytics data to retrieve. "\
|
||||
"The value for <category> must be `install`, `install-on-request`, "\
|
||||
"`cask-install`, `build-error` or `os-version`. The default is `install`."
|
||||
depends_on: "--analytics",
|
||||
description: "Which type of global analytics data to retrieve. "\
|
||||
"The value for <category> must be `install`, `install-on-request`, "\
|
||||
"`cask-install`, `build-error` or `os-version`. The default is `install`."
|
||||
switch "--github",
|
||||
description: "Open a browser to the GitHub source page for <formula>. "\
|
||||
"To view formula history locally: `brew log -p` <formula>"
|
||||
description: "Open a browser to the GitHub source page for <formula>. "\
|
||||
"To view formula history locally: `brew log -p` <formula>"
|
||||
flag "--json",
|
||||
description: "Print a JSON representation of <formula>. Currently the default and only accepted "\
|
||||
"value for <version> is `v1`. See the docs for examples of using the JSON "\
|
||||
"output: <https://docs.brew.sh/Querying-Brew>"
|
||||
description: "Print a JSON representation of <formula>. Currently the default and only accepted "\
|
||||
"value for <version> is `v1`. See the docs for examples of using the JSON "\
|
||||
"output: <https://docs.brew.sh/Querying-Brew>"
|
||||
switch "--installed",
|
||||
depends_on: "--json",
|
||||
description: "Print JSON of formulae that are currently installed."
|
||||
depends_on: "--json",
|
||||
description: "Print JSON of formulae that are currently installed."
|
||||
switch "--all",
|
||||
depends_on: "--json",
|
||||
description: "Print JSON of all available formulae."
|
||||
depends_on: "--json",
|
||||
description: "Print JSON of all available formulae."
|
||||
switch :verbose,
|
||||
description: "Show more verbose analytics data for <formula>."
|
||||
description: "Show more verbose analytics data for <formula>."
|
||||
switch :debug
|
||||
conflicts "--installed", "--all"
|
||||
end
|
||||
@ -222,7 +222,7 @@ module Homebrew
|
||||
return if ENV["HOMEBREW_NO_ANALYTICS"] || ENV["HOMEBREW_NO_GITHUB_API"]
|
||||
|
||||
output, = curl_output("--max-time", "5",
|
||||
"https://formulae.brew.sh/api/#{endpoint}")
|
||||
"https://formulae.brew.sh/api/#{endpoint}")
|
||||
return if output.blank?
|
||||
|
||||
JSON.parse(output)
|
||||
|
@ -27,64 +27,64 @@ module Homebrew
|
||||
EOS
|
||||
|
||||
switch :debug,
|
||||
description: "If brewing fails, open an interactive debugging session with access to IRB "\
|
||||
"or a shell inside the temporary build directory"
|
||||
description: "If brewing fails, open an interactive debugging session with access to IRB "\
|
||||
"or a shell inside the temporary build directory"
|
||||
flag "--env=",
|
||||
description: "If `std` is passed, use the standard build environment instead of superenv."\
|
||||
"If `super` is passed, use superenv even if the formula specifies the "\
|
||||
"standard build environment."
|
||||
description: "If `std` is passed, use the standard build environment instead of superenv."\
|
||||
"If `super` is passed, use superenv even if the formula specifies the "\
|
||||
"standard build environment."
|
||||
switch "--ignore-dependencies",
|
||||
description: "An unsupported Homebrew development flag to skip installing any dependencies of "\
|
||||
"any kind. If the dependencies are not already present, the formula will have issues. "\
|
||||
"If you're not developing Homebrew, consider adjusting your PATH rather than "\
|
||||
"using this flag."
|
||||
description: "An unsupported Homebrew development flag to skip installing any dependencies of "\
|
||||
"any kind. If the dependencies are not already present, the formula will have issues. "\
|
||||
"If you're not developing Homebrew, consider adjusting your PATH rather than "\
|
||||
"using this flag."
|
||||
switch "--only-dependencies",
|
||||
description: "Install the dependencies with specified options but do not install the "\
|
||||
"specified formula."
|
||||
description: "Install the dependencies with specified options but do not install the "\
|
||||
"specified formula."
|
||||
flag "--cc=",
|
||||
description: "Attempt to compile using provided <compiler>. <compiler> should be the "\
|
||||
"name of the compiler's executable, for instance `gcc-7` for GCC 7. "\
|
||||
"In order to use LLVM's clang, use `llvm_clang`. To specify the "\
|
||||
"Apple-provided clang, use `clang`. This parameter will only accept "\
|
||||
"compilers that are provided by Homebrew or bundled with macOS. "\
|
||||
"Please do not file issues if you encounter errors while using this flag."
|
||||
description: "Attempt to compile using provided <compiler>. <compiler> should be the "\
|
||||
"name of the compiler's executable, for instance `gcc-7` for GCC 7. "\
|
||||
"In order to use LLVM's clang, use `llvm_clang`. To specify the "\
|
||||
"Apple-provided clang, use `clang`. This parameter will only accept "\
|
||||
"compilers that are provided by Homebrew or bundled with macOS. "\
|
||||
"Please do not file issues if you encounter errors while using this flag."
|
||||
switch "-s", "--build-from-source",
|
||||
description: "Compile the specified <formula> from source even if a bottle is provided. "\
|
||||
"Dependencies will still be installed from bottles if they are available."
|
||||
description: "Compile the specified <formula> from source even if a bottle is provided. "\
|
||||
"Dependencies will still be installed from bottles if they are available."
|
||||
switch "--force-bottle",
|
||||
description: "Install from a bottle if it exists for the current or newest version of "\
|
||||
"macOS, even if it would not normally be used for installation."
|
||||
description: "Install from a bottle if it exists for the current or newest version of "\
|
||||
"macOS, even if it would not normally be used for installation."
|
||||
switch "--include-test",
|
||||
description: "Install testing dependencies required to run `brew test`."
|
||||
description: "Install testing dependencies required to run `brew test`."
|
||||
switch "--devel",
|
||||
description: "If <formula> defines it, install the development version."
|
||||
description: "If <formula> defines it, install the development version."
|
||||
switch "--HEAD",
|
||||
description: "If <formula> defines it, install the HEAD version, aka. master, trunk, unstable."
|
||||
description: "If <formula> defines it, install the HEAD version, aka. master, trunk, unstable."
|
||||
switch "--fetch-HEAD",
|
||||
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
|
||||
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
|
||||
"updates when a new stable or development version has been released."
|
||||
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
|
||||
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
|
||||
"updates when a new stable or development version has been released."
|
||||
switch "--keep-tmp",
|
||||
description: "Don't delete the temporary files created during installation."
|
||||
description: "Don't delete the temporary files created during installation."
|
||||
switch "--build-bottle",
|
||||
description: "Prepare the formula for eventual bottling during installation."
|
||||
description: "Prepare the formula for eventual bottling during installation."
|
||||
flag "--bottle-arch=",
|
||||
depends_on: "--build-bottle",
|
||||
description: "Optimise bottles for the given architecture rather than the oldest "\
|
||||
"architecture supported by the version of macOS the bottles are built on."
|
||||
depends_on: "--build-bottle",
|
||||
description: "Optimise bottles for the given architecture rather than the oldest "\
|
||||
"architecture supported by the version of macOS the bottles are built on."
|
||||
switch :force,
|
||||
description: "Install without checking for previously installed keg-only or "\
|
||||
"non-migrated versions."
|
||||
description: "Install without checking for previously installed keg-only or "\
|
||||
"non-migrated versions."
|
||||
switch :verbose,
|
||||
description: "Print the verification and postinstall steps."
|
||||
description: "Print the verification and postinstall steps."
|
||||
switch "--display-times",
|
||||
description: "Print install times for each formula at the end of the run."
|
||||
description: "Print install times for each formula at the end of the run."
|
||||
switch "-i", "--interactive",
|
||||
description: "Download and patch <formula>, then open a shell. This allows the user to "\
|
||||
"run `./configure --help` and otherwise determine how to turn the software "\
|
||||
"package into a Homebrew package."
|
||||
description: "Download and patch <formula>, then open a shell. This allows the user to "\
|
||||
"run `./configure --help` and otherwise determine how to turn the software "\
|
||||
"package into a Homebrew package."
|
||||
switch "-g", "--git",
|
||||
description: "Create a Git repository, useful for creating patches to the software."
|
||||
description: "Create a Git repository, useful for creating patches to the software."
|
||||
conflicts "--ignore-dependencies", "--only-dependencies"
|
||||
conflicts "--devel", "--HEAD"
|
||||
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
|
||||
|
@ -17,12 +17,12 @@ module Homebrew
|
||||
installations.
|
||||
EOS
|
||||
switch "--overwrite",
|
||||
description: "Delete files already existing in the prefix while linking."
|
||||
description: "Delete files already existing in the prefix while linking."
|
||||
switch "-n", "--dry-run",
|
||||
description: "List all files which would be linked or deleted by "\
|
||||
"`brew link --overwrite`, but will not actually link or delete any files."
|
||||
description: "List all files which would be linked or deleted by "\
|
||||
"`brew link --overwrite`, but will not actually link or delete any files."
|
||||
switch :force,
|
||||
description: "Allow only key-only formulae to be linked."
|
||||
description: "Allow only key-only formulae to be linked."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -15,31 +15,31 @@ module Homebrew
|
||||
List all installed formulae.
|
||||
EOS
|
||||
switch "--full-name",
|
||||
description: "Print formulae with fully-qualified names. If `--full-name` is not "\
|
||||
"passed, other options (i.e. `-1`, `-l`, `-t` and `-r`) are passed to `ls` "\
|
||||
"which produces the actual output."
|
||||
description: "Print formulae with fully-qualified names. If `--full-name` is not "\
|
||||
"passed, other options (i.e. `-1`, `-l`, `-t` and `-r`) are passed to `ls` "\
|
||||
"which produces the actual output."
|
||||
switch "--unbrewed",
|
||||
description: "List all files in the Homebrew prefix not installed by Homebrew."
|
||||
description: "List all files in the Homebrew prefix not installed by Homebrew."
|
||||
switch "--versions",
|
||||
description: "Show the version number for installed formulae, or only the specified "\
|
||||
"formulae if <formula> are given."
|
||||
description: "Show the version number for installed formulae, or only the specified "\
|
||||
"formulae if <formula> are given."
|
||||
switch "--multiple",
|
||||
depends_on: "--versions",
|
||||
description: "Only show formulae with multiple versions installed."
|
||||
depends_on: "--versions",
|
||||
description: "Only show formulae with multiple versions installed."
|
||||
switch "--pinned",
|
||||
description: "Show the versions of pinned formulae, or only the specified (pinned) "\
|
||||
"formulae if <formula> are given. See also `pin`, `unpin`."
|
||||
description: "Show the versions of pinned formulae, or only the specified (pinned) "\
|
||||
"formulae if <formula> are given. See also `pin`, `unpin`."
|
||||
# passed through to ls
|
||||
switch "-1",
|
||||
description: "Force output to be one entry per line. " \
|
||||
"This is the default when output is not to a terminal."
|
||||
description: "Force output to be one entry per line. " \
|
||||
"This is the default when output is not to a terminal."
|
||||
switch "-l",
|
||||
description: "List in long format. If the output is to a terminal, "\
|
||||
"a total sum for all the file sizes is output on a line before the long listing."
|
||||
description: "List in long format. If the output is to a terminal, "\
|
||||
"a total sum for all the file sizes is output on a line before the long listing."
|
||||
switch "-r",
|
||||
description: "Reverse the order of the sort to get the oldest entries first."
|
||||
description: "Reverse the order of the sort to get the oldest entries first."
|
||||
switch "-t",
|
||||
description: "Sort by time modified (most recently modified first)."
|
||||
description: "Sort by time modified (most recently modified first)."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -14,13 +14,13 @@ module Homebrew
|
||||
Show the `git log` for the given <formula>.
|
||||
EOS
|
||||
switch "-p", "-u", "--patch",
|
||||
description: "Also output patch from commit."
|
||||
description: "Also output patch from commit."
|
||||
switch "--stat",
|
||||
description: "Also output diffstat from commit."
|
||||
description: "Also output diffstat from commit."
|
||||
switch "--oneline",
|
||||
description: "Output only one line per commit."
|
||||
description: "Output only one line per commit."
|
||||
switch "-1", "--max-count=1",
|
||||
description: "Output only one commit."
|
||||
description: "Output only one commit."
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -15,8 +15,8 @@ module Homebrew
|
||||
packages.
|
||||
EOS
|
||||
switch :force,
|
||||
description: "Treat installed <formula> and passed <formula> like if they are from "\
|
||||
"same taps and migrate them anyway."
|
||||
description: "Treat installed <formula> and passed <formula> like if they are from "\
|
||||
"same taps and migrate them anyway."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -19,8 +19,8 @@ module Homebrew
|
||||
`missing` exits with a non-zero status if any formulae are missing dependencies.
|
||||
EOS
|
||||
comma_array "--hide",
|
||||
description: "Act as if none of the provided <hidden> are installed. <hidden> should be "\
|
||||
"comma-separated list of formulae."
|
||||
description: "Act as if none of the provided <hidden> are installed. <hidden> should be "\
|
||||
"comma-separated list of formulae."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -15,11 +15,11 @@ module Homebrew
|
||||
Display install options specific to <formula>
|
||||
EOS
|
||||
switch "--compact",
|
||||
description: "Show all options on a single line separated by spaces."
|
||||
description: "Show all options on a single line separated by spaces."
|
||||
switch "--all",
|
||||
description: "Show options for all formulae."
|
||||
description: "Show options for all formulae."
|
||||
switch "--installed",
|
||||
description: "Show options for all installed formulae."
|
||||
description: "Show options for all installed formulae."
|
||||
switch :debug
|
||||
conflicts "--all", "--installed"
|
||||
end
|
||||
|
@ -18,17 +18,17 @@ module Homebrew
|
||||
suppressed otherwise.
|
||||
EOS
|
||||
switch :quiet,
|
||||
description: "List only the names of outdated brews (takes precedence over `--verbose`)."
|
||||
description: "List only the names of outdated brews (takes precedence over `--verbose`)."
|
||||
switch :verbose,
|
||||
description: "Display detailed version information."
|
||||
description: "Display detailed version information."
|
||||
flag "--json",
|
||||
description: "Print output in JSON format. Currently the default and only accepted "\
|
||||
"value for <version> is `v1`. See the docs for examples of using the JSON "\
|
||||
"output: <https://docs.brew.sh/Querying-Brew>"
|
||||
description: "Print output in JSON format. Currently the default and only accepted "\
|
||||
"value for <version> is `v1`. See the docs for examples of using the JSON "\
|
||||
"output: <https://docs.brew.sh/Querying-Brew>"
|
||||
switch "--fetch-HEAD",
|
||||
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
|
||||
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
|
||||
"updates when a new stable or development version has been released."
|
||||
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
|
||||
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
|
||||
"updates when a new stable or development version has been released."
|
||||
switch :debug
|
||||
conflicts "--quiet", "--verbose", "--json"
|
||||
end
|
||||
|
@ -20,22 +20,22 @@ module Homebrew
|
||||
Unless `HOMEBREW_NO_INSTALL_CLEANUP` is set, `brew cleanup` will be run for the reinstalled formulae or, every 30 days, for all formulae.
|
||||
EOS
|
||||
switch :debug,
|
||||
description: "If brewing fails, open an interactive debugging session with access to IRB "\
|
||||
"or a shell inside the temporary build directory"
|
||||
description: "If brewing fails, open an interactive debugging session with access to IRB "\
|
||||
"or a shell inside the temporary build directory"
|
||||
switch "-s", "--build-from-source",
|
||||
description: "Compile <formula> from source even if a bottle is available."
|
||||
description: "Compile <formula> from source even if a bottle is available."
|
||||
switch "--force-bottle",
|
||||
description: "Install from a bottle if it exists for the current or newest version of "\
|
||||
"macOS, even if it would not normally be used for installation."
|
||||
description: "Install from a bottle if it exists for the current or newest version of "\
|
||||
"macOS, even if it would not normally be used for installation."
|
||||
switch "--keep-tmp",
|
||||
description: "Don't delete the temporary files created during installation."
|
||||
description: "Don't delete the temporary files created during installation."
|
||||
switch :force,
|
||||
description: "Install without checking for previously installed keg-only or "\
|
||||
"non-migrated versions."
|
||||
description: "Install without checking for previously installed keg-only or "\
|
||||
"non-migrated versions."
|
||||
switch :verbose,
|
||||
description: "Print the verification and postinstall steps."
|
||||
description: "Print the verification and postinstall steps."
|
||||
switch "--display-times",
|
||||
description: "Print install times for each formula at the end of the run."
|
||||
description: "Print install times for each formula at the end of the run."
|
||||
conflicts "--build-from-source", "--force-bottle"
|
||||
formula_options
|
||||
end
|
||||
|
@ -37,16 +37,16 @@ module Homebrew
|
||||
No online search is performed.
|
||||
EOS
|
||||
switch "--casks",
|
||||
description: "Display all locally available casks (including tapped ones). "\
|
||||
"No online search is performed."
|
||||
description: "Display all locally available casks (including tapped ones). "\
|
||||
"No online search is performed."
|
||||
switch "--desc",
|
||||
description: "search formulae with a description matching <text> and casks with "\
|
||||
"a name matching <text>."
|
||||
description: "search formulae with a description matching <text> and casks with "\
|
||||
"a name matching <text>."
|
||||
|
||||
package_manager_switches = PACKAGE_MANAGERS.keys.map { |name| "--#{name}" }
|
||||
package_manager_switches.each do |s|
|
||||
switch s,
|
||||
description: "Search for <text> in the given package manager's list."
|
||||
description: "Search for <text> in the given package manager's list."
|
||||
end
|
||||
switch :verbose
|
||||
switch :debug
|
||||
|
@ -19,7 +19,7 @@ module Homebrew
|
||||
which otherwise build systems would not find.
|
||||
EOS
|
||||
flag "--env=",
|
||||
description: "Use the standard `PATH` instead of superenv's, when <std> is passed"
|
||||
description: "Use the standard `PATH` instead of superenv's, when <std> is passed"
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -20,15 +20,15 @@ module Homebrew
|
||||
including core code and all formulae.
|
||||
EOS
|
||||
switch "--fix",
|
||||
description: "Fix style violations automatically using RuboCop's auto-correct feature."
|
||||
description: "Fix style violations automatically using RuboCop's auto-correct feature."
|
||||
switch "--display-cop-names",
|
||||
description: "Include the RuboCop cop name for each violation in the output."
|
||||
description: "Include the RuboCop cop name for each violation in the output."
|
||||
comma_array "--only-cops",
|
||||
description: "Specify a comma-separated <cops> list to check for violations of only the "\
|
||||
"listed RuboCop cops."
|
||||
description: "Specify a comma-separated <cops> list to check for violations of only the "\
|
||||
"listed RuboCop cops."
|
||||
comma_array "--except-cops",
|
||||
description: "Specify a comma-separated <cops> list to skip checking for violations of the "\
|
||||
"listed RuboCop cops."
|
||||
description: "Specify a comma-separated <cops> list to skip checking for violations of the "\
|
||||
"listed RuboCop cops."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
conflicts "--only-cops", "--except-cops"
|
||||
|
@ -14,11 +14,11 @@ module Homebrew
|
||||
Display a brief summary of all installed taps if no <tap> are passed.
|
||||
EOS
|
||||
switch "--installed",
|
||||
description: "Display information on all installed taps."
|
||||
description: "Display information on all installed taps."
|
||||
flag "--json",
|
||||
description: "Print a JSON representation of <taps>. Currently the default and only accepted "\
|
||||
"value for <version> is `v1`. See the docs for examples of using the JSON "\
|
||||
"output: <https://docs.brew.sh/Querying-Brew>"
|
||||
description: "Print a JSON representation of <taps>. Currently the default and only accepted "\
|
||||
"value for <version> is `v1`. See the docs for examples of using the JSON "\
|
||||
"output: <https://docs.brew.sh/Querying-Brew>"
|
||||
switch :debug
|
||||
end
|
||||
end
|
||||
|
@ -20,7 +20,7 @@ module Homebrew
|
||||
|
||||
def tap_pin
|
||||
odeprecated "brew tap-pin user/tap",
|
||||
"fully-scoped user/tap/formula naming"
|
||||
"fully-scoped user/tap/formula naming"
|
||||
|
||||
tap_pin_args.parse
|
||||
|
||||
|
@ -19,7 +19,7 @@ module Homebrew
|
||||
|
||||
def tap_unpin
|
||||
odeprecated "brew tap-pin user/tap",
|
||||
"fully-scoped user/tap/formula naming"
|
||||
"fully-scoped user/tap/formula naming"
|
||||
|
||||
tap_unpin_args.parse
|
||||
|
||||
|
@ -25,18 +25,18 @@ module Homebrew
|
||||
using protocols other than HTTPS, e.g., SSH, GIT, HTTP, FTP(S), RSYNC.
|
||||
EOS
|
||||
switch "--full",
|
||||
description: "Use a full clone when tapping a repository. By default, the repository is "\
|
||||
"cloned as a shallow copy (`--depth=1`). To convert a shallow copy to a "\
|
||||
"full copy, you can retap passing `--full` without first untapping."
|
||||
description: "Use a full clone when tapping a repository. By default, the repository is "\
|
||||
"cloned as a shallow copy (`--depth=1`). To convert a shallow copy to a "\
|
||||
"full copy, you can retap passing `--full` without first untapping."
|
||||
switch "--force-auto-update",
|
||||
description: "Auto-update tap even if it is not hosted on GitHub. By default, only taps "\
|
||||
"hosted on GitHub are auto-updated (for performance reasons)."
|
||||
description: "Auto-update tap even if it is not hosted on GitHub. By default, only taps "\
|
||||
"hosted on GitHub are auto-updated (for performance reasons)."
|
||||
switch "--repair",
|
||||
description: "Migrate tapped formulae from symlink-based to directory-based structure."
|
||||
description: "Migrate tapped formulae from symlink-based to directory-based structure."
|
||||
switch "--list-pinned",
|
||||
description: "List all pinned taps."
|
||||
description: "List all pinned taps."
|
||||
switch "-q", "--quieter",
|
||||
description: "Suppress any warnings."
|
||||
description: "Suppress any warnings."
|
||||
switch :debug
|
||||
end
|
||||
end
|
||||
|
@ -17,10 +17,10 @@ module Homebrew
|
||||
Uninstall <formula>.
|
||||
EOS
|
||||
switch :force,
|
||||
description: "Delete all installed versions of the <formula>"
|
||||
description: "Delete all installed versions of the <formula>"
|
||||
switch "--ignore-dependencies",
|
||||
description: "Don't fail uninstall, even if <formula> is a dependency of any installed "\
|
||||
"formulae."
|
||||
description: "Don't fail uninstall, even if <formula> is a dependency of any installed "\
|
||||
"formulae."
|
||||
switch :debug
|
||||
end
|
||||
end
|
||||
|
@ -16,8 +16,8 @@ module Homebrew
|
||||
`brew unlink` <formula> `&&` <commands> `&& brew link` <formula>
|
||||
EOS
|
||||
switch "-n", "--dry-run",
|
||||
description: "List all files which would be unlinked, but will not actually unlink or "\
|
||||
"delete any files."
|
||||
description: "List all files which would be unlinked, but will not actually unlink or "\
|
||||
"delete any files."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -16,12 +16,12 @@ module Homebrew
|
||||
working directory.
|
||||
EOS
|
||||
flag "--destdir=",
|
||||
description: "Create subdirectories in the directory named by <path> instead."
|
||||
description: "Create subdirectories in the directory named by <path> instead."
|
||||
switch "--patch",
|
||||
description: "Patches for <formula> will be applied to the unpacked source."
|
||||
description: "Patches for <formula> will be applied to the unpacked source."
|
||||
switch "-g", "--git",
|
||||
description: "Initialise a Git repository in the unpacked source. This is useful for creating "\
|
||||
"patches for the software."
|
||||
description: "Initialise a Git repository in the unpacked source. This is useful for creating "\
|
||||
"patches for the software."
|
||||
switch :force
|
||||
switch :verbose
|
||||
switch :debug
|
||||
|
@ -26,7 +26,7 @@ module Homebrew
|
||||
The Ruby implementation of `brew update`. Never called manually.
|
||||
EOS
|
||||
switch "--preinstall",
|
||||
description: "Run in 'auto-update' mode (faster, less output)."
|
||||
description: "Run in 'auto-update' mode (faster, less output)."
|
||||
switch :force
|
||||
switch :quiet
|
||||
switch :debug
|
||||
|
@ -24,28 +24,28 @@ module Homebrew
|
||||
Unless `HOMEBREW_NO_INSTALL_CLEANUP` is set, `brew cleanup` will be run for the upgraded formulae or, every 30 days, for all formulae.
|
||||
EOS
|
||||
switch :debug,
|
||||
description: "If brewing fails, open an interactive debugging session with access to IRB "\
|
||||
"or a shell inside the temporary build directory"
|
||||
description: "If brewing fails, open an interactive debugging session with access to IRB "\
|
||||
"or a shell inside the temporary build directory"
|
||||
switch "-s", "--build-from-source",
|
||||
description: "Compile <formula> from source even if a bottle is available."
|
||||
description: "Compile <formula> from source even if a bottle is available."
|
||||
switch "--force-bottle",
|
||||
description: "Install from a bottle if it exists for the current or newest version of "\
|
||||
"macOS, even if it would not normally be used for installation."
|
||||
description: "Install from a bottle if it exists for the current or newest version of "\
|
||||
"macOS, even if it would not normally be used for installation."
|
||||
switch "--fetch-HEAD",
|
||||
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
|
||||
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
|
||||
"updates when a new stable or development version has been released."
|
||||
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
|
||||
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
|
||||
"updates when a new stable or development version has been released."
|
||||
switch "--ignore-pinned",
|
||||
description: "Set a 0 exit code even if pinned formulae are not upgraded."
|
||||
description: "Set a 0 exit code even if pinned formulae are not upgraded."
|
||||
switch "--keep-tmp",
|
||||
description: "Don't delete the temporary files created during installation."
|
||||
description: "Don't delete the temporary files created during installation."
|
||||
switch :force,
|
||||
description: "Install without checking for previously installed keg-only or "\
|
||||
"non-migrated versions."
|
||||
description: "Install without checking for previously installed keg-only or "\
|
||||
"non-migrated versions."
|
||||
switch :verbose,
|
||||
description: "Print the verification and postinstall steps."
|
||||
description: "Print the verification and postinstall steps."
|
||||
switch "--display-times",
|
||||
description: "Print install times for each formula at the end of the run."
|
||||
description: "Print install times for each formula at the end of the run."
|
||||
conflicts "--build-from-source", "--force-bottle"
|
||||
formula_options
|
||||
end
|
||||
|
@ -25,21 +25,21 @@ module Homebrew
|
||||
By default, `uses` shows usage of <formula> by stable builds.
|
||||
EOS
|
||||
switch "--recursive",
|
||||
description: "Resolve more than one level of dependencies."
|
||||
description: "Resolve more than one level of dependencies."
|
||||
switch "--installed",
|
||||
description: "Only list installed formulae."
|
||||
description: "Only list installed formulae."
|
||||
switch "--include-build",
|
||||
description: "Include all formulae that specify <formula> as `:build` type dependency."
|
||||
description: "Include all formulae that specify <formula> as `:build` type dependency."
|
||||
switch "--include-test",
|
||||
description: "Include all formulae that specify <formula> as `:test` type dependency."
|
||||
description: "Include all formulae that specify <formula> as `:test` type dependency."
|
||||
switch "--include-optional",
|
||||
description: "Include all formulae that specify <formula> as `:optional` type dependency."
|
||||
description: "Include all formulae that specify <formula> as `:optional` type dependency."
|
||||
switch "--skip-recommended",
|
||||
description: "Skip all formulae that specify <formula> as `:recommended` type dependency."
|
||||
description: "Skip all formulae that specify <formula> as `:recommended` type dependency."
|
||||
switch "--devel",
|
||||
description: "Show usage of <formula> by development build."
|
||||
description: "Show usage of <formula> by development build."
|
||||
switch "--HEAD",
|
||||
description: "Show usage of <formula> by HEAD build."
|
||||
description: "Show usage of <formula> by HEAD build."
|
||||
switch :debug
|
||||
conflicts "--devel", "--HEAD"
|
||||
end
|
||||
|
@ -163,7 +163,7 @@ class DependencyCollector
|
||||
# allow unknown strategies to pass through
|
||||
else
|
||||
raise TypeError,
|
||||
"#{strategy.inspect} is not an AbstractDownloadStrategy subclass"
|
||||
"#{strategy.inspect} is not an AbstractDownloadStrategy subclass"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -26,34 +26,34 @@ module Homebrew
|
||||
If no <formula> are provided, all of them are checked.
|
||||
EOS
|
||||
switch "--strict",
|
||||
description: "Run additional style checks, including RuboCop style checks."
|
||||
description: "Run additional style checks, including RuboCop style checks."
|
||||
switch "--online",
|
||||
description: "Run additional slower style checks that require a network connection."
|
||||
description: "Run additional slower style checks that require a network connection."
|
||||
switch "--new-formula",
|
||||
description: "Run various additional style checks to determine if a new formula is eligible "\
|
||||
"for Homebrew. This should be used when creating new formula and implies "\
|
||||
"`--strict` and `--online`."
|
||||
description: "Run various additional style checks to determine if a new formula is eligible "\
|
||||
"for Homebrew. This should be used when creating new formula and implies "\
|
||||
"`--strict` and `--online`."
|
||||
switch "--fix",
|
||||
description: "Fix style violations automatically using RuboCop's auto-correct feature."
|
||||
description: "Fix style violations automatically using RuboCop's auto-correct feature."
|
||||
switch "--display-cop-names",
|
||||
description: "Include the RuboCop cop name for each violation in the output."
|
||||
description: "Include the RuboCop cop name for each violation in the output."
|
||||
switch "--display-filename",
|
||||
description: "Prefix every line of output with name of the file or formula being audited, to "\
|
||||
"make output easy to grep."
|
||||
description: "Prefix every line of output with name of the file or formula being audited, to "\
|
||||
"make output easy to grep."
|
||||
switch "-D", "--audit-debug",
|
||||
description: "Enable debugging and profiling of audit methods."
|
||||
description: "Enable debugging and profiling of audit methods."
|
||||
comma_array "--only",
|
||||
description: "Specify a comma-separated <method> list to only run the methods named "\
|
||||
"`audit_`<method>."
|
||||
description: "Specify a comma-separated <method> list to only run the methods named "\
|
||||
"`audit_`<method>."
|
||||
comma_array "--except",
|
||||
description: "Specify a comma-separated <method> list to skip running the methods named "\
|
||||
"`audit_`<method>."
|
||||
description: "Specify a comma-separated <method> list to skip running the methods named "\
|
||||
"`audit_`<method>."
|
||||
comma_array "--only-cops",
|
||||
description: "Specify a comma-separated <cops> list to check for violations of only the listed "\
|
||||
"RuboCop cops."
|
||||
description: "Specify a comma-separated <cops> list to check for violations of only the listed "\
|
||||
"RuboCop cops."
|
||||
comma_array "--except-cops",
|
||||
description: "Specify a comma-separated <cops> list to skip checking for violations of the listed "\
|
||||
"RuboCop cops."
|
||||
description: "Specify a comma-separated <cops> list to skip checking for violations of the listed "\
|
||||
"RuboCop cops."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
conflicts "--only", "--except"
|
||||
@ -532,9 +532,9 @@ module Homebrew
|
||||
return unless DevelopmentTools.curl_handles_most_https_certificates?
|
||||
|
||||
if http_content_problem = curl_check_http_content(homepage,
|
||||
user_agents: [:browser, :default],
|
||||
check_content: true,
|
||||
strict: @strict)
|
||||
user_agents: [:browser, :default],
|
||||
check_content: true,
|
||||
strict: @strict)
|
||||
problem http_content_problem
|
||||
end
|
||||
end
|
||||
|
@ -53,33 +53,33 @@ module Homebrew
|
||||
value, while `--no-rebuild` will remove it.
|
||||
EOS
|
||||
switch "--skip-relocation",
|
||||
description: "Do not check if the bottle can be marked as relocatable."
|
||||
description: "Do not check if the bottle can be marked as relocatable."
|
||||
switch "--or-later",
|
||||
description: "Append `_or_later` to the bottle tag."
|
||||
description: "Append `_or_later` to the bottle tag."
|
||||
switch "--force-core-tap",
|
||||
description: "Build a bottle even if <formula> is not in `homebrew/core` or any installed taps."
|
||||
description: "Build a bottle even if <formula> is not in `homebrew/core` or any installed taps."
|
||||
switch "--no-rebuild",
|
||||
description: "If the formula specifies a rebuild version, remove it from the generated DSL."
|
||||
description: "If the formula specifies a rebuild version, remove it from the generated DSL."
|
||||
switch "--keep-old",
|
||||
description: "If the formula specifies a rebuild version, attempt to preserve its value in the "\
|
||||
"generated DSL."
|
||||
description: "If the formula specifies a rebuild version, attempt to preserve its value in the "\
|
||||
"generated DSL."
|
||||
switch "--json",
|
||||
description: "Write bottle information to a JSON file, which can be used as the argument for "\
|
||||
"`--merge`."
|
||||
description: "Write bottle information to a JSON file, which can be used as the argument for "\
|
||||
"`--merge`."
|
||||
switch "--merge",
|
||||
description: "Generate an updated bottle block for a formula and optionally merge it into the "\
|
||||
"formula file. Instead of a formula name, requires a JSON file generated with "\
|
||||
"`brew bottle --json` <formula>."
|
||||
description: "Generate an updated bottle block for a formula and optionally merge it into the "\
|
||||
"formula file. Instead of a formula name, requires a JSON file generated with "\
|
||||
"`brew bottle --json` <formula>."
|
||||
switch "--write",
|
||||
depends_on: "--merge",
|
||||
description: "Write the changes to the formula file. A new commit will be generated unless "\
|
||||
"`--no-commit` is passed."
|
||||
depends_on: "--merge",
|
||||
description: "Write the changes to the formula file. A new commit will be generated unless "\
|
||||
"`--no-commit` is passed."
|
||||
switch "--no-commit",
|
||||
depends_on: "--write",
|
||||
description: "When passed with `--write`, a new commit will not generated after writing changes "\
|
||||
"to the formula file."
|
||||
depends_on: "--write",
|
||||
description: "When passed with `--write`, a new commit will not generated after writing changes "\
|
||||
"to the formula file."
|
||||
flag "--root-url=",
|
||||
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
|
||||
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
conflicts "--no-rebuild", "--keep-old"
|
||||
@ -545,8 +545,8 @@ module Homebrew
|
||||
|
||||
path.parent.cd do
|
||||
safe_system "git", "commit", "--no-edit", "--verbose",
|
||||
"--message=#{short_name}: #{update_or_add} #{pkg_version} bottle.",
|
||||
"--", path
|
||||
"--message=#{short_name}: #{update_or_add} #{pkg_version} bottle.",
|
||||
"--", path
|
||||
end
|
||||
end
|
||||
else
|
||||
|
@ -26,38 +26,38 @@ module Homebrew
|
||||
formula already uses.
|
||||
EOS
|
||||
switch "--devel",
|
||||
description: "Bump the development rather than stable version. The development spec must already exist."
|
||||
description: "Bump the development rather than stable version. The development spec must already exist."
|
||||
switch "-n", "--dry-run",
|
||||
description: "Print what would be done rather than doing it."
|
||||
description: "Print what would be done rather than doing it."
|
||||
switch "--write",
|
||||
depends_on: "--dry-run",
|
||||
description: "When passed along with `--dry-run`, perform a not-so-dry run by making the expected "\
|
||||
"file modifications but not taking any Git actions."
|
||||
depends_on: "--dry-run",
|
||||
description: "When passed along with `--dry-run`, perform a not-so-dry run by making the expected "\
|
||||
"file modifications but not taking any Git actions."
|
||||
switch "--no-audit",
|
||||
description: "Don't run `brew audit` before opening the PR."
|
||||
description: "Don't run `brew audit` before opening the PR."
|
||||
switch "--strict",
|
||||
description: "Run `brew audit --strict` before opening the PR."
|
||||
description: "Run `brew audit --strict` before opening the PR."
|
||||
switch "--no-browse",
|
||||
description: "Print the pull request URL instead of opening in a browser."
|
||||
description: "Print the pull request URL instead of opening in a browser."
|
||||
flag "--mirror=",
|
||||
description: "Use the provided <URL> as a mirror URL."
|
||||
description: "Use the provided <URL> as a mirror URL."
|
||||
flag "--version=",
|
||||
description: "Use the provided <version> to override the value parsed from the URL or tag. Note "\
|
||||
"that `--version=0` can be used to delete an existing version override from a "\
|
||||
"formula if it has become redundant."
|
||||
description: "Use the provided <version> to override the value parsed from the URL or tag. Note "\
|
||||
"that `--version=0` can be used to delete an existing version override from a "\
|
||||
"formula if it has become redundant."
|
||||
flag "--message=",
|
||||
description: "Append the provided <message> to the default PR message."
|
||||
description: "Append the provided <message> to the default PR message."
|
||||
flag "--url=",
|
||||
description: "Specify the <URL> for the new download. If a <URL> is specified, the <SHA-256> "\
|
||||
"checksum of the new download should also be specified."
|
||||
description: "Specify the <URL> for the new download. If a <URL> is specified, the <SHA-256> "\
|
||||
"checksum of the new download should also be specified."
|
||||
flag "--sha256=",
|
||||
depends_on: "--url=",
|
||||
description: "Specify the <SHA-256> checksum of the new download."
|
||||
depends_on: "--url=",
|
||||
description: "Specify the <SHA-256> checksum of the new download."
|
||||
flag "--tag=",
|
||||
description: "Specify the new git commit <tag> for the formula."
|
||||
description: "Specify the new git commit <tag> for the formula."
|
||||
flag "--revision=",
|
||||
required_for: "--tag=",
|
||||
description: "Specify the new git commit <revision> corresponding to a specified <tag>."
|
||||
required_for: "--tag=",
|
||||
description: "Specify the new git commit <revision> corresponding to a specified <tag>."
|
||||
|
||||
switch :force
|
||||
switch :quiet
|
||||
@ -340,8 +340,8 @@ module Homebrew
|
||||
safe_system "git", "fetch", "--unshallow", "origin" if shallow
|
||||
safe_system "git", "checkout", "--no-track", "-b", branch, "origin/master"
|
||||
safe_system "git", "commit", "--no-edit", "--verbose",
|
||||
"--message=#{formula.name} #{new_formula_version}#{devel_message}",
|
||||
"--", formula.path
|
||||
"--message=#{formula.name} #{new_formula_version}#{devel_message}",
|
||||
"--", formula.path
|
||||
safe_system "git", "push", "--set-upstream", remote_url, "#{branch}:#{branch}"
|
||||
safe_system "git", "checkout", "--quiet", "-"
|
||||
pr_message = <<~EOS
|
||||
|
@ -20,23 +20,23 @@ module Homebrew
|
||||
<http://www.rubydoc.info/github/Homebrew/brew/master/Formula>
|
||||
EOS
|
||||
switch "--autotools",
|
||||
description: "Create a basic template for an Autotools-style build."
|
||||
description: "Create a basic template for an Autotools-style build."
|
||||
switch "--cmake",
|
||||
description: "Create a basic template for a CMake-style build."
|
||||
description: "Create a basic template for a CMake-style build."
|
||||
switch "--meson",
|
||||
description: "Create a basic template for a Meson-style build."
|
||||
description: "Create a basic template for a Meson-style build."
|
||||
switch "--no-fetch",
|
||||
description: "Homebrew will not download <URL> to the cache and will thus not add the SHA-256 "\
|
||||
"to the formula for you, nor will it check the GitHub API for GitHub projects "\
|
||||
"(to fill out its description and homepage)."
|
||||
description: "Homebrew will not download <URL> to the cache and will thus not add the SHA-256 "\
|
||||
"to the formula for you, nor will it check the GitHub API for GitHub projects "\
|
||||
"(to fill out its description and homepage)."
|
||||
switch "--HEAD",
|
||||
description: "Indicate that <URL> points to the package's repository rather than a file."
|
||||
description: "Indicate that <URL> points to the package's repository rather than a file."
|
||||
flag "--set-name=",
|
||||
description: "Set the name of the new formula to the provided <name>."
|
||||
description: "Set the name of the new formula to the provided <name>."
|
||||
flag "--set-version=",
|
||||
description: "Set the version of the new formula to the provided <version>."
|
||||
description: "Set the version of the new formula to the provided <version>."
|
||||
flag "--tap=",
|
||||
description: "Generate the new formula in the provided tap, specified as <user>`/`<repo>."
|
||||
description: "Generate the new formula in the provided tap, specified as <user>`/`<repo>."
|
||||
switch :force
|
||||
switch :verbose
|
||||
switch :debug
|
||||
|
@ -88,7 +88,7 @@ module Homebrew
|
||||
EOS
|
||||
|
||||
flag "--version=",
|
||||
description: "Extract the provided <version> of <formula> instead of the most recent."
|
||||
description: "Extract the provided <version> of <formula> instead of the most recent."
|
||||
switch :force
|
||||
switch :debug
|
||||
end
|
||||
|
@ -25,10 +25,10 @@ module Homebrew
|
||||
Enter the interactive Homebrew Ruby shell.
|
||||
EOS
|
||||
switch "--examples",
|
||||
description: "Show several examples."
|
||||
description: "Show several examples."
|
||||
switch "--pry",
|
||||
env: :pry,
|
||||
description: "Use Pry instead of IRB. Implied if `HOMEBREW_PRY` is set."
|
||||
env: :pry,
|
||||
description: "Use Pry instead of IRB. Implied if `HOMEBREW_PRY` is set."
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -16,14 +16,14 @@ module Homebrew
|
||||
Raises an error if run on uninstalled formulae.
|
||||
EOS
|
||||
switch "--test",
|
||||
description: "Display only missing libraries and exit with a non-zero status if any missing "\
|
||||
"libraries are found."
|
||||
description: "Display only missing libraries and exit with a non-zero status if any missing "\
|
||||
"libraries are found."
|
||||
switch "--reverse",
|
||||
description: "For every library that a keg references, print its dylib path followed by the "\
|
||||
"binaries that link to it."
|
||||
description: "For every library that a keg references, print its dylib path followed by the "\
|
||||
"binaries that link to it."
|
||||
switch "--cached",
|
||||
description: "Print the cached linkage values stored in `HOMEBREW_CACHE`, set by a previous "\
|
||||
"`brew linkage` run."
|
||||
description: "Print the cached linkage values stored in `HOMEBREW_CACHE`, set by a previous "\
|
||||
"`brew linkage` run."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -24,12 +24,12 @@ module Homebrew
|
||||
Generate Homebrew's manpages.
|
||||
EOS
|
||||
switch "--fail-if-changed",
|
||||
description: "Return a failing status code if changes are detected in the manpage outputs. This "\
|
||||
"can be used for CI to be notified when the manpages are out of date. Additionally, "\
|
||||
"the date used in new manpages will match those in the existing manpages (to allow "\
|
||||
"comparison without factoring in the date)."
|
||||
description: "Return a failing status code if changes are detected in the manpage outputs. This "\
|
||||
"can be used for CI to be notified when the manpages are out of date. Additionally, "\
|
||||
"the date used in new manpages will match those in the existing manpages (to allow "\
|
||||
"comparison without factoring in the date)."
|
||||
switch "--link",
|
||||
description: "This is now done automatically by `brew update`."
|
||||
description: "This is now done automatically by `brew update`."
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -36,28 +36,28 @@ module Homebrew
|
||||
on GitHub, the URL of a commit on GitHub or a "https://jenkins.brew.sh/job/..." testing job URL.
|
||||
EOS
|
||||
switch "--bottle",
|
||||
description: "Handle bottles, pulling the bottle-update commit and publishing files on Bintray."
|
||||
description: "Handle bottles, pulling the bottle-update commit and publishing files on Bintray."
|
||||
switch "--bump",
|
||||
description: "For one-formula PRs, automatically reword commit message to our preferred format."
|
||||
description: "For one-formula PRs, automatically reword commit message to our preferred format."
|
||||
switch "--clean",
|
||||
description: "Do not rewrite or otherwise modify the commits found in the pulled PR."
|
||||
description: "Do not rewrite or otherwise modify the commits found in the pulled PR."
|
||||
switch "--ignore-whitespace",
|
||||
description: "Silently ignore whitespace discrepancies when applying diffs."
|
||||
description: "Silently ignore whitespace discrepancies when applying diffs."
|
||||
switch "--resolve",
|
||||
description: "When a patch fails to apply, leave in progress and allow user to resolve, instead "\
|
||||
"of aborting."
|
||||
description: "When a patch fails to apply, leave in progress and allow user to resolve, instead "\
|
||||
"of aborting."
|
||||
switch "--branch-okay",
|
||||
description: "Do not warn if pulling to a branch besides master (useful for testing)."
|
||||
description: "Do not warn if pulling to a branch besides master (useful for testing)."
|
||||
switch "--no-pbcopy",
|
||||
description: "Do not copy anything to the system clipboard."
|
||||
description: "Do not copy anything to the system clipboard."
|
||||
switch "--no-publish",
|
||||
description: "Do not publish bottles to Bintray."
|
||||
description: "Do not publish bottles to Bintray."
|
||||
switch "--warn-on-publish-failure",
|
||||
description: "Do not exit if there's a failure publishing bottles on Bintray."
|
||||
description: "Do not exit if there's a failure publishing bottles on Bintray."
|
||||
flag "--bintray-org=",
|
||||
description: "Publish bottles at the provided Bintray <organisation>."
|
||||
description: "Publish bottles at the provided Bintray <organisation>."
|
||||
flag "--test-bot-user=",
|
||||
description: "Pull the bottle block commit from the provided <user> on GitHub."
|
||||
description: "Pull the bottle block commit from the provided <user> on GitHub."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -15,7 +15,7 @@ module Homebrew
|
||||
If no <end_ref> is provided it defaults to `origin/master`.
|
||||
EOS
|
||||
switch "--markdown",
|
||||
description: "Print as a Markdown list."
|
||||
description: "Print as a Markdown list."
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -14,7 +14,7 @@ module Homebrew
|
||||
`brew ruby -e "puts :gcc.f.deps"` or `brew ruby script.rb`
|
||||
EOS
|
||||
switch "-e",
|
||||
description: "Execute the provided string argument as a script."
|
||||
description: "Execute the provided string argument as a script."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -20,11 +20,11 @@ module Homebrew
|
||||
*Example:* `brew install jruby && brew test jruby`
|
||||
EOS
|
||||
switch "--devel",
|
||||
description: "Test the development version of a formula."
|
||||
description: "Test the development version of a formula."
|
||||
switch "--HEAD",
|
||||
description: "Test the head version of a formula."
|
||||
description: "Test the head version of a formula."
|
||||
switch "--keep-tmp",
|
||||
description: "Keep the temporary files created for the test."
|
||||
description: "Keep the temporary files created for the test."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
conflicts "--devel", "--HEAD"
|
||||
|
@ -14,19 +14,19 @@ module Homebrew
|
||||
Run Homebrew's unit and integration tests.
|
||||
EOS
|
||||
switch "--coverage",
|
||||
description: "Generate code coverage reports."
|
||||
description: "Generate code coverage reports."
|
||||
switch "--generic",
|
||||
description: "Run only OS-agnostic tests."
|
||||
description: "Run only OS-agnostic tests."
|
||||
switch "--no-compat",
|
||||
description: "Do not load the compatibility layer when running tests."
|
||||
description: "Do not load the compatibility layer when running tests."
|
||||
switch "--online",
|
||||
description: "Include tests that use the GitHub API and tests that use any of the taps for "\
|
||||
"official external commands."
|
||||
description: "Include tests that use the GitHub API and tests that use any of the taps for "\
|
||||
"official external commands."
|
||||
flag "--only=",
|
||||
description: "Run only <test_script>`_spec.rb`. Appending `:`<line_number> will start at a "\
|
||||
"specific line."
|
||||
description: "Run only <test_script>`_spec.rb`. Appending `:`<line_number> will start at a "\
|
||||
"specific line."
|
||||
flag "--seed=",
|
||||
description: "Randomise tests with the provided <value> instead of a random seed."
|
||||
description: "Randomise tests with the provided <value> instead of a random seed."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -14,13 +14,13 @@ module Homebrew
|
||||
If no arguments are passed, use `origin/master` as the start commit.
|
||||
EOS
|
||||
switch "--to-tag",
|
||||
description: "Set `HOMEBREW_UPDATE_TO_TAG` to test updating between tags."
|
||||
description: "Set `HOMEBREW_UPDATE_TO_TAG` to test updating between tags."
|
||||
switch "--keep-tmp",
|
||||
description: "Retain the temporary directory containing the new repository clone."
|
||||
description: "Retain the temporary directory containing the new repository clone."
|
||||
flag "--commit=",
|
||||
description: "Use provided <commit> as the start commit."
|
||||
description: "Use provided <commit> as the start commit."
|
||||
flag "--before=",
|
||||
description: "Use the commit at provided <date> as the start commit."
|
||||
description: "Use the commit at provided <date> as the start commit."
|
||||
switch :verbose
|
||||
switch :debug
|
||||
end
|
||||
|
@ -1068,7 +1068,7 @@ class DownloadStrategyDetector
|
||||
detect_from_symbol(using)
|
||||
else
|
||||
raise TypeError,
|
||||
"Unknown download strategy specification #{strategy.inspect}"
|
||||
"Unknown download strategy specification #{strategy.inspect}"
|
||||
end
|
||||
|
||||
strategy
|
||||
|
@ -9,9 +9,9 @@ module UnpackStrategy
|
||||
# folder has incorrect permissions.
|
||||
# (Also, Homebrew's ZIP artifact automatically deletes this folder.)
|
||||
return system_command! "ditto",
|
||||
args: ["-x", "-k", path, unpack_dir],
|
||||
verbose: verbose,
|
||||
print_stderr: false
|
||||
args: ["-x", "-k", path, unpack_dir],
|
||||
verbose: verbose,
|
||||
print_stderr: false
|
||||
end
|
||||
|
||||
result = begin
|
||||
|
@ -196,8 +196,8 @@ class FormulaInstaller
|
||||
return if pinned_unsatisfied_deps.empty?
|
||||
|
||||
raise CannotInstallFormulaError,
|
||||
"You must `brew unpin #{pinned_unsatisfied_deps * " "}` as installing " \
|
||||
"#{formula.full_name} requires the latest version of pinned dependencies"
|
||||
"You must `brew unpin #{pinned_unsatisfied_deps * " "}` as installing " \
|
||||
"#{formula.full_name} requires the latest version of pinned dependencies"
|
||||
end
|
||||
|
||||
def build_bottle_preinstall
|
||||
|
@ -31,12 +31,12 @@ module Formulary
|
||||
|
||||
begin
|
||||
mod.const_get(class_name)
|
||||
rescue NameError => original_exception
|
||||
rescue NameError => e
|
||||
class_list = mod.constants
|
||||
.map { |const_name| mod.const_get(const_name) }
|
||||
.select { |const| const.is_a?(Class) }
|
||||
e = FormulaClassUnavailableError.new(name, path, class_name, class_list)
|
||||
raise e, "", original_exception.backtrace
|
||||
new_exception = FormulaClassUnavailableError.new(name, path, class_name, class_list)
|
||||
raise new_exception, "", e.backtrace
|
||||
end
|
||||
end
|
||||
|
||||
@ -463,7 +463,7 @@ module Formulary
|
||||
selected_formula = factory(possible_pinned_tap_formulae.first, spec)
|
||||
if core_path(ref).file?
|
||||
odeprecated "brew tap-pin user/tap",
|
||||
"fully-scoped user/tap/formula naming"
|
||||
"fully-scoped user/tap/formula naming"
|
||||
opoo <<~EOS
|
||||
#{ref} is provided by core, but is now shadowed by #{selected_formula.full_name}.
|
||||
This behaviour is deprecated and will be removed in Homebrew 2.2.0.
|
||||
|
@ -189,8 +189,8 @@ class Keg
|
||||
extend Forwardable
|
||||
|
||||
def_delegators :path,
|
||||
:to_s, :hash, :abv, :disk_usage, :file_count, :directory?, :exist?, :/,
|
||||
:join, :rename, :find
|
||||
:to_s, :hash, :abv, :disk_usage, :file_count, :directory?, :exist?, :/,
|
||||
:join, :rename, :find
|
||||
|
||||
def initialize(path)
|
||||
path = path.resolved_path if path.to_s.start_with?("#{HOMEBREW_PREFIX}/opt/")
|
||||
|
@ -117,8 +117,8 @@ class ExternalPatch
|
||||
attr_reader :resource, :strip
|
||||
|
||||
def_delegators :resource,
|
||||
:url, :fetch, :patch_files, :verify_download_integrity, :cached_download,
|
||||
:clear_cache
|
||||
:url, :fetch, :patch_files, :verify_download_integrity, :cached_download,
|
||||
:clear_cache
|
||||
|
||||
def initialize(strip, &block)
|
||||
@strip = strip
|
||||
|
@ -18,7 +18,7 @@ class CodesignRequirement < Requirement
|
||||
mktemp do
|
||||
FileUtils.cp "/usr/bin/false", "codesign_check"
|
||||
quiet_system "/usr/bin/codesign", "-f", "-s", @identity,
|
||||
"--dryrun", "codesign_check"
|
||||
"--dryrun", "codesign_check"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -71,7 +71,7 @@ class JavaRequirement < Requirement
|
||||
JAVA_SUGGESTION_MAP = {
|
||||
"1.8" => CaskSuggestion.new(
|
||||
"homebrew/cask-versions/adoptopenjdk8",
|
||||
"AdoptOpenJDK 8",
|
||||
"AdoptOpenJDK 8",
|
||||
),
|
||||
"12.0" => CaskSuggestion.new("adoptopenjdk", "AdoptOpenJDK"),
|
||||
}.freeze
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
require_relative "load_path"
|
||||
|
||||
require "rubocop-performance"
|
||||
require "rubocop-rspec"
|
||||
require "rubocops/formula_desc"
|
||||
require "rubocops/components_order"
|
||||
|
@ -250,7 +250,7 @@ shared_examples "#uninstall_phase or #zap_phase" do
|
||||
expect(subject).to receive(:system_command!)
|
||||
.with(
|
||||
"osascript",
|
||||
args: ["-e", 'tell application "System Events" to delete every login item whose name is "Fancy"'],
|
||||
args: ["-e", 'tell application "System Events" to delete every login item whose name is "Fancy"'],
|
||||
)
|
||||
.and_return(instance_double("SystemCommand::Result"))
|
||||
|
||||
|
@ -81,7 +81,7 @@ describe Cask::Cmd::Style, :cask do
|
||||
|
||||
it {
|
||||
expect(subject).to contain_exactly(a_path_ending_with("/homebrew/homebrew-cask/Casks"),
|
||||
a_path_ending_with("/third-party/homebrew-tap/Casks"))
|
||||
a_path_ending_with("/third-party/homebrew-tap/Casks"))
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -221,7 +221,7 @@ RSpec.shared_context "integration test" do
|
||||
system "git", "init"
|
||||
system "git", "add", "--all"
|
||||
system "git", "commit", "-m",
|
||||
"#{old_name.capitalize} has not yet been renamed"
|
||||
"#{old_name.capitalize} has not yet been renamed"
|
||||
|
||||
brew "install", old_name
|
||||
|
||||
@ -230,7 +230,7 @@ RSpec.shared_context "integration test" do
|
||||
|
||||
system "git", "add", "--all"
|
||||
system "git", "commit", "-m",
|
||||
"#{old_name.capitalize} has been renamed to #{new_name.capitalize}"
|
||||
"#{old_name.capitalize} has been renamed to #{new_name.capitalize}"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -120,7 +120,7 @@ describe Tap do
|
||||
cd path do
|
||||
system "git", "init"
|
||||
system "git", "remote", "add", "origin",
|
||||
"https://github.com/someone/homebrew-foo"
|
||||
"https://github.com/someone/homebrew-foo"
|
||||
end
|
||||
expect(t.issues_url).to eq("https://github.com/someone/homebrew-foo/issues")
|
||||
expect(subject.issues_url).to eq("https://github.com/Homebrew/homebrew-foo/issues")
|
||||
|
@ -35,8 +35,8 @@ describe Git do
|
||||
it "gives revision commit based on before_commit when it is not nil" do
|
||||
expect(
|
||||
described_class.last_revision_commit_of_file(HOMEBREW_CACHE,
|
||||
file,
|
||||
before_commit: hash2),
|
||||
file,
|
||||
before_commit: hash2),
|
||||
).to eq(hash2)
|
||||
end
|
||||
end
|
||||
|
@ -35,8 +35,8 @@ describe Utils do
|
||||
it "returns true when remote exists", :needs_network, :needs_svn do
|
||||
HOMEBREW_CACHE.cd do
|
||||
system HOMEBREW_SHIMS_PATH/"scm/svn", "checkout",
|
||||
"--non-interactive", "--trust-server-cert", "--quiet",
|
||||
"https://github.com/Homebrew/install"
|
||||
"--non-interactive", "--trust-server-cert", "--quiet",
|
||||
"https://github.com/Homebrew/install"
|
||||
end
|
||||
|
||||
expect(described_class).to be_svn_remote_exists(HOMEBREW_CACHE/"install")
|
||||
|
@ -63,9 +63,9 @@ module Utils
|
||||
else
|
||||
pid = fork do
|
||||
exec ENV["HOMEBREW_CURL"],
|
||||
*args,
|
||||
"--silent", "--output", "/dev/null",
|
||||
"https://www.google-analytics.com/collect"
|
||||
*args,
|
||||
"--silent", "--output", "/dev/null",
|
||||
"https://www.google-analytics.com/collect"
|
||||
end
|
||||
Process.detach pid
|
||||
end
|
||||
@ -73,10 +73,10 @@ module Utils
|
||||
|
||||
def report_event(category, action, label = os_prefix_ci, value = nil)
|
||||
report(:event,
|
||||
ec: category,
|
||||
ea: action,
|
||||
el: label,
|
||||
ev: value)
|
||||
ec: category,
|
||||
ea: action,
|
||||
el: label,
|
||||
ev: value)
|
||||
end
|
||||
|
||||
def report_build_error(exception)
|
||||
|
@ -60,7 +60,7 @@ module Utils
|
||||
end
|
||||
|
||||
def formula_contents(bottle_file,
|
||||
name: resolve_formula_names(bottle_file)[0])
|
||||
name: resolve_formula_names(bottle_file)[0])
|
||||
bottle_version = resolve_version bottle_file
|
||||
formula_path = "#{name}/#{bottle_version}/.brew/#{name}.rb"
|
||||
contents = Utils.popen_read "tar", "-xOzf", bottle_file, formula_path
|
||||
|
Loading…
x
Reference in New Issue
Block a user