Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for internal messaging #14571

Merged

Conversation

EricFromCanada
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Fixes for a wide variety of style and formatting nits in brew's messaging and manpage. This companion messaging-fixes branch has them broken down by category.

@BrewTestBot
Copy link
Member

Review period will end on 2023-02-10 at 17:20:05 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 9, 2023
Comment on lines +206 to +207
to either the standard prefix for your platform or to a non-standard prefix that
is not in the Homebrew temporary directory.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have an environment variable for the default prefix somewhere.

@@ -30,7 +30,7 @@ def install_args
Unless `HOMEBREW_NO_INSTALL_CLEANUP` is set, `brew cleanup` will then be run for
the installed formulae or, every 30 days, for all formulae.

Unless `HOMEBREW_NO_INSTALL_UPGRADE` is set, `brew install <formula>` will upgrade <formula> if it
Unless `HOMEBREW_NO_INSTALL_UPGRADE` is set, `brew install` <formula> will upgrade <formula> if it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't want to keep <formula> inside the backticks:

Suggested change
Unless `HOMEBREW_NO_INSTALL_UPGRADE` is set, `brew install` <formula> will upgrade <formula> if it
Unless `HOMEBREW_NO_INSTALL_UPGRADE` is set, `brew install foo`, where `foo` is the name of a formula, will upgrade `foo` if it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the <formula> usage but agree having it in backticks might be nicer

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything in angle brackets becomes monospaced italic in the Markdown output, but it needs to be outside a backticked sequence for it to output properly, i.e.

`brew install` *`formula`*   # correct
`brew install *`formula`*`   # not correct

This is because Markdown allows a monospaced sequence to be italicized in its entirety using delimiters outside the backticks, but not within.

# HOMEBREW_CURL is set by brew.sh (and isn't mispelt here)
# HOMEBREW_CURL is set by brew.sh (and isn't misspelt here)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

@@ -21,8 +21,8 @@ def dispatch_build_bottle_args
description: "Build timeout (in minutes, default: 60)."
flag "--issue=",
description: "If specified, post a comment to this issue number if the job fails."
comma_array "--macos=",
description: "Version(s) of macOS the bottle should be built for."
comma_array "--macos",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other args end with = here though. Does this change the usage of the command?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The = only has meaning for flag, indicating to the parser that an argument is required. It has no meaning for switch, which never takes arguments, nor for comma_array, which always requires them (and eats any = that follows). In retrospect it may have been better to use a more obvious convention, e.g. flag_opt / flag_req or similar.

@@ -16,7 +16,7 @@ def vendor_gems_args
EOS

comma_array "--update",
description: "Update all vendored Gems to the latest version."
description: "Update the specified list of vendored gems to the latest version."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if I don't specify any arguments to --update?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error: missing argument: --update

@@ -27,7 +27,7 @@
.and be_a_failure
end

it "prints a warning with `--installed` if the given Formula is not installed", :integration_test do
it "prints a warning when using `--installed` if the given Formula is not installed", :integration_test do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it "prints a warning when using `--installed` if the given Formula is not installed", :integration_test do
it "prints a warning when `--installed` is used and the given Formula is not installed", :integration_test do

@carlocab
Copy link
Member

This companion messaging-fixes branch has them broken down by category.

Might be nicer to use that branch here so that we can see the commits in your PR.

@@ -98,15 +98,15 @@ module EnvConfig
"`~/.profile`, `~/.bash_profile`, or `~/.zshenv`:" \
'\n\n `export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=/Library/Fonts"`',
},
HOMEBREW_CLEANUP_MAX_AGE_DAYS: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lint to ensure these are sorted some time would be nice. Either a help wanted issue or PR would be great

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 10, 2023
@BrewTestBot
Copy link
Member

Review period ended.

@EricFromCanada EricFromCanada merged commit 5cfb179 into Homebrew:master Feb 11, 2023
@EricFromCanada EricFromCanada deleted the messaging-fixes-combined branch February 11, 2023 04:57
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants