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

dev-cmd/edit: Show API install warning after the edit is done #17408

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

abitrolly
Copy link
Contributor

@abitrolly abitrolly commented Jun 2, 2024

  • 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?

brew edit ocp outputs this text when the editor is opened.

$ brew edit ocp
Warning: `brew install` ignores locally edited casks and formulae if
HOMEBREW_NO_INSTALL_FROM_API is not set.
Editing /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/o/ocp.rb
Warning: Using vim because no editor was set in the environment.
This may change in the future, so we recommend setting EDITOR
or HOMEBREW_EDITOR to your preferred text editor.

The PR moves the first warning so that it is shown only when the edit is finished.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Why is it better for this to be after rather than before?

@abitrolly
Copy link
Contributor Author

Because the message about "brew install" doesn't make too much sense when user invokes "brew edit". Only if the edit is successful. The next step is to improve the message with the actual command to test the edit.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks @abitrolly!

@MikeMcQuaid MikeMcQuaid merged commit 84319ee into Homebrew:master Jun 4, 2024
25 checks passed
@abitrolly abitrolly deleted the warn-after-edit branch June 4, 2024 08:04
@github-actions github-actions bot added the outdated PR was locked due to age label Jul 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2024
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.

2 participants