Skip to content

Commit 884a3ae

Browse files
Merge pull request #20479 from Homebrew/inline-docs-updates
Messaging and comment adjustments
2 parents d5abe49 + 468d466 commit 884a3ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+122
-118
lines changed

Library/Homebrew/api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def self.fetch(endpoint)
2727
api_url = "#{HOMEBREW_API_DEFAULT_DOMAIN}/#{endpoint}"
2828
output = Utils::Curl.curl_output("--fail", api_url)
2929
end
30-
raise ArgumentError, "No file found at #{Tty.underline}#{api_url}#{Tty.reset}" unless output.success?
30+
raise ArgumentError, "No file found at: #{Tty.underline}#{api_url}#{Tty.reset}" unless output.success?
3131

3232
cache[endpoint] = JSON.parse(output.stdout, freeze: true)
3333
rescue JSON::ParserError

Library/Homebrew/brew.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ then
201201
odie <<EOS
202202
conflicting Homebrew wrapper configuration!
203203
HOMEBREW_FORCE_BREW_WRAPPER was set to ${HOMEBREW_FORCE_BREW_WRAPPER}
204-
but HOMEBREW_BREW_WRAPPER was unset.
204+
but HOMEBREW_BREW_WRAPPER was unset.
205205
206206
$(bold "Ensure you run ${HOMEBREW_FORCE_BREW_WRAPPER} directly (not ${HOMEBREW_BREW_FILE})")!
207207
@@ -713,8 +713,8 @@ else
713713
then
714714
message="Please update your system curl or set HOMEBREW_CURL_PATH to a newer version.
715715
Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION}
716-
Your curl version: ${curl_name_and_version##* }
717-
Your curl executable: $(type -p "${HOMEBREW_CURL}")"
716+
Your curl version: ${curl_name_and_version##* }
717+
Your curl executable: $(type -p "${HOMEBREW_CURL}")"
718718

719719
if [[ -z ${HOMEBREW_CURL_PATH} ]]
720720
then
@@ -741,8 +741,8 @@ Your curl executable: $(type -p "${HOMEBREW_CURL}")"
741741
then
742742
message="Please update your system Git or set HOMEBREW_GIT_PATH to a newer version.
743743
Minimum required version: ${HOMEBREW_MINIMUM_GIT_VERSION}
744-
Your Git version: ${major}.${minor}.${micro}.${build}
745-
Your Git executable: $(unset git && type -p "${HOMEBREW_GIT}")"
744+
Your Git version: ${major}.${minor}.${micro}.${build}
745+
Your Git executable: $(unset git && type -p "${HOMEBREW_GIT}")"
746746
if [[ -z ${HOMEBREW_GIT_PATH} ]]
747747
then
748748
HOMEBREW_FORCE_BREWED_GIT="1"

Library/Homebrew/cask/artifact/abstract_uninstall.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def uninstall_script(directives, directive_name: :script, force: false, command:
389389
end
390390

391391
def uninstall_pkgutil(*pkgs, command: nil, **_)
392-
ohai "Uninstalling packages with sudo; the password may be necessary:"
392+
ohai "Uninstalling packages with `sudo` (which may request your password)..."
393393
pkgs.each do |regex|
394394
::Cask::Pkg.all_matching(regex, command).each do |pkg|
395395
puts pkg.package_id

Library/Homebrew/cask/artifact/pkg.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def install_phase(**options)
3535
private
3636

3737
def run_installer(command: nil, verbose: false, **_options)
38-
ohai "Running installer for #{cask} with sudo; the password may be necessary."
38+
ohai "Running installer for #{cask} with `sudo` (which may request your password)..."
3939
unless path.exist?
4040
pkg = path.relative_path_from(cask.staged_path)
4141
pkgs = Pathname.glob(cask.staged_path/"**"/"*.pkg").map { |path| path.relative_path_from(cask.staged_path) }

Library/Homebrew/cask/audit.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,8 @@ def audit_signing
537537
# Shell scripts cannot be signed, so we skip them
538538
next false if path.text_executable?
539539

540-
system_command("codesign", args: ["--verify", "-R=notarized", "--check-notarization", path],
541-
print_stderr: false)
540+
system_command("codesign", args: ["--verify", "-R=notarized", "--check-notarization", path],
541+
print_stderr: false)
542542
else
543543
add_error "Unknown artifact type: #{artifact.class}", location: url.location
544544
end

Library/Homebrew/cask/staged.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def set_ownership(paths, user: T.must(User.current), group: "staff")
2525
full_paths = remove_nonexistent(paths)
2626
return if full_paths.empty?
2727

28-
ohai "Changing ownership of paths required by #{@cask} with sudo; the password may be necessary."
28+
ohai "Changing ownership of paths required by #{@cask} with `sudo` (which may request your password)..."
2929
@command.run!("/usr/sbin/chown", args: ["-R", "--", "#{user}:#{group}", *full_paths],
3030
sudo: true)
3131
end

Library/Homebrew/cmd/deps.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ class Deps < AbstractCommand
8888

8989
sig { override.void }
9090
def run
91-
raise UsageError, "`brew deps --os=all` is not supported" if args.os == "all"
92-
raise UsageError, "`brew deps --arch=all` is not supported" if args.arch == "all"
91+
raise UsageError, "`brew deps --os=all` is not supported." if args.os == "all"
92+
raise UsageError, "`brew deps --arch=all` is not supported." if args.arch == "all"
9393

9494
os, arch = T.must(args.os_arch_combinations.first)
9595
eval_all = args.eval_all?

Library/Homebrew/cmd/install.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def run
181181
# `build.rb`. Instead, `hide_from_man_page` and don't do anything with
182182
# this argument here.
183183
# This odisabled should stick around indefinitely.
184-
odisabled "brew install --env", "`env :std` in specific formula files"
184+
odisabled "`brew install --env`", "`env :std` in specific formula files"
185185
end
186186

187187
args.named.each do |name|

Library/Homebrew/cmd/services.rb

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,27 @@ class Services < AbstractCommand
2525
If `sudo` is passed, operate on `/Library/LaunchDaemons` or `/usr/lib/systemd/system` (started at boot).
2626
Otherwise, operate on `~/Library/LaunchAgents` or `~/.config/systemd/user` (started at login).
2727
28-
[`sudo`] `brew services` [`list`] (`--json`) (`--debug`):
28+
[`sudo`] `brew services` [`list`] [`--json`] [`--debug`]:
2929
List information about all managed services for the current user (or root).
3030
Provides more output from Homebrew and `launchctl`(1) or `systemctl`(1) if run with `--debug`.
3131
32-
[`sudo`] `brew services info` (<formula>|`--all`|`--json`):
32+
[`sudo`] `brew services info` (<formula>|`--all`) [`--json`]:
3333
List all managed services for the current user (or root).
3434
35-
[`sudo`] `brew services run` (<formula>|`--all`|`--file=`):
35+
[`sudo`] `brew services run` (<formula>|`--all`) [`--file=`]:
3636
Run the service <formula> without registering to launch at login (or boot).
3737
38-
[`sudo`] `brew services start` (<formula>|`--all`|`--file=`):
38+
[`sudo`] `brew services start` (<formula>|`--all`) [`--file=`]:
3939
Start the service <formula> immediately and register it to launch at login (or boot).
4040
41-
[`sudo`] `brew services stop` (`--keep`) (`--no-wait`|`--max-wait=`) (<formula>|`--all`):
41+
[`sudo`] `brew services stop` [`--keep`] [`--no-wait`|`--max-wait=`] (<formula>|`--all`):
4242
Stop the service <formula> immediately and unregister it from launching at login (or boot),
4343
unless `--keep` is specified.
4444
4545
[`sudo`] `brew services kill` (<formula>|`--all`):
4646
Stop the service <formula> immediately but keep it registered to launch at login (or boot).
4747
48-
[`sudo`] `brew services restart` (<formula>|`--all`|`--file=`):
48+
[`sudo`] `brew services restart` (<formula>|`--all`) [`--file=`]:
4949
Stop (if necessary) and start the service <formula> immediately and register it to launch at login (or boot).
5050
5151
[`sudo`] `brew services cleanup`:
@@ -58,15 +58,16 @@ class Services < AbstractCommand
5858
flag "--max-wait=",
5959
description: "Wait at most this many seconds for `stop` to finish stopping a service. " \
6060
"Defaults to 60. Set this to zero (0) seconds to wait indefinitely."
61-
switch "--all",
62-
description: "Run <subcommand> on all services."
63-
switch "--json",
64-
description: "Output as JSON."
6561
switch "--no-wait",
6662
description: "Don't wait for `stop` to finish stopping the service."
6763
switch "--keep",
6864
description: "When stopped, don't unregister the service from launching at login (or boot)."
65+
switch "--all",
66+
description: "Run <subcommand> on all services."
67+
switch "--json",
68+
description: "Output as JSON."
6969

70+
conflicts "--all", "--file"
7071
conflicts "--max-wait=", "--no-wait"
7172

7273
named_args %w[list info run start stop kill restart cleanup]
@@ -112,7 +113,7 @@ def run
112113
]
113114
if no_named_formula_commands.include?(subcommand)
114115
raise UsageError, "The `#{subcommand}` subcommand does not accept a formula argument!" if formulae.present?
115-
raise UsageError, "The `#{subcommand}` subcommand does not accept the --all argument!" if args.all?
116+
raise UsageError, "The `#{subcommand}` subcommand does not accept the `--all` argument!" if args.all?
116117
end
117118

118119
if args.file
@@ -122,22 +123,22 @@ def run
122123
*Homebrew::Services::Commands::Restart::TRIGGERS,
123124
]
124125
if file_commands.exclude?(subcommand)
125-
raise UsageError, "The `#{subcommand}` subcommand does not accept the --file= argument!"
126-
elsif args.all?
127-
raise UsageError,
128-
"The `#{subcommand}` subcommand does not accept the --all and --file= arguments at the same time!"
126+
raise UsageError, "The `#{subcommand}` subcommand does not accept the `--file=` argument!"
129127
end
130128
end
131129

132130
unless Homebrew::Services::Commands::Stop::TRIGGERS.include?(subcommand)
133-
raise UsageError, "The `#{subcommand}` subcommand does not accept the --keep argument!" if args.keep?
134-
raise UsageError, "The `#{subcommand}` subcommand does not accept the --no-wait argument!" if args.no_wait?
131+
raise UsageError, "The `#{subcommand}` subcommand does not accept the `--keep` argument!" if args.keep?
132+
133+
if args.no_wait?
134+
raise UsageError, "The `#{subcommand}` subcommand does not accept the `--no-wait` argument!"
135+
end
135136
if args.max_wait
136-
raise UsageError, "The `#{subcommand}` subcommand does not accept the --max-wait= argument!"
137+
raise UsageError, "The `#{subcommand}` subcommand does not accept the `--max-wait=` argument!"
137138
end
138139
end
139140

140-
opoo "The --all argument overrides provided formula argument!" if formulae.present? && args.all?
141+
opoo "The `--all` argument overrides provided formula argument!" if formulae.present? && args.all?
141142

142143
targets = if args.all?
143144
if subcommand == "start"

Library/Homebrew/cmd/upgrade.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class UpgradeCmd < AbstractCommand
126126
sig { override.void }
127127
def run
128128
if args.build_from_source? && args.named.empty?
129-
raise ArgumentError, "--build-from-source requires at least one formula"
129+
raise ArgumentError, "`--build-from-source` requires at least one formula"
130130
end
131131

132132
formulae, casks = args.named.to_resolved_formulae_to_casks

0 commit comments

Comments
 (0)