Skip to content

Prepend cask name to cask upgrade error message#8150

Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
kiendang:cask-upgrade-error
Jul 31, 2020
Merged

Prepend cask name to cask upgrade error message#8150
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
kiendang:cask-upgrade-error

Conversation

@kiendang
Copy link
Copy Markdown
Contributor

  • 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 tests with your changes locally?

When upgrading casks all exceptions are aggregated and displayed at the end. When multiple casks are upgraded, this makes it sometimes not obvious which cask the exception belongs to.

Solution: prepend the cask name to the error message.

Before

Error: pkg source file not found: 'gfortran-6.3-Sierra/gfortran.pkg'

After

Error: gfortran 6.3: pkg source file not found: 'gfortran-6.3-Sierra/gfortran.pkg'

(In this example the original error message contains gfortran. However in some cases the error message does not contain reference to the cask being upgraded at all.)

@MikeMcQuaid MikeMcQuaid requested a review from a team July 31, 2020 10:37
@MikeMcQuaid MikeMcQuaid added the cask Homebrew Cask label Jul 31, 2020
Copy link
Copy Markdown
Contributor

@vitorgalvao vitorgalvao left a comment

Choose a reason for hiding this comment

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

I’m fine with it, though please remove the version from the message. It’s not particularly useful information and will make it harder to understand which cask it is, because it becomes ambiguous if it’s from homebrew/cask-versions or another repo.

@kiendang kiendang force-pushed the cask-upgrade-error branch from 6e2551e to 6918972 Compare July 31, 2020 13:52
@MikeMcQuaid MikeMcQuaid merged commit 20e1126 into Homebrew:master Jul 31, 2020
@MikeMcQuaid
Copy link
Copy Markdown
Member

Thanks again @kiendang!

@kiendang kiendang deleted the cask-upgrade-error branch August 2, 2020 05:26
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 21, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cask Homebrew Cask outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants