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

cask/utils: quieten down when fixing permissions fails. #16993

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

MikeMcQuaid
Copy link
Member

When fixing permissions fails, we should not print the error messages from e.g. chmod unless we are in debug or verbose mode (because we immediately retry taking ownership sudo).

@MikeMcQuaid MikeMcQuaid enabled auto-merge April 1, 2024 14:57
@EricFromCanada
Copy link
Member

Do these tests need updating?

Failure/Error: let(:install_phase) { app.install_phase(command:, adopt:, force:) }
[44](https://github.com/Homebrew/brew/actions/runs/8509621444/job/23305566001?pr=16993#step:12:45)

[45](https://github.com/Homebrew/brew/actions/runs/8509621444/job/23305566001?pr=16993#step:12:46)
  #<NeverSudoSystemCommand (class)> received :run with unexpected arguments
[46](https://github.com/Homebrew/brew/actions/runs/8509621444/job/23305566001?pr=16993#step:12:47)
    expected: ("/usr/bin/chflags", {:args=>["-R", "--", "000", #<Pathname:/private/tmp/homebrew-tests-20240401-6937-dslbc6/cask-appdir/Caffeine.app>]})
[47](https://github.com/Homebrew/brew/actions/runs/8509621444/job/23305566001?pr=16993#step:12:48)
         got: ("/usr/bin/chflags", {:args=>["-R", "--", "000", #<Pathname:/private/tmp/homebrew-tests-20240401-6937-dslbc6/cask-appdir/Caffeine.app>], :print_stderr=>false})

When fixing permissions fails, we should not print the error messages
from e.g. `chmod` unless we are in debug or verbose mode (because we
immediately retry taking ownership `sudo`).
@MikeMcQuaid MikeMcQuaid force-pushed the cask_chmod_etc_stderr branch from 53f18d6 to 7e35ae2 Compare April 1, 2024 15:22
@MikeMcQuaid
Copy link
Member Author

Do these tests need updating?

Yup, done 😁

@MikeMcQuaid MikeMcQuaid merged commit bd1155b into master Apr 1, 2024
25 checks passed
@MikeMcQuaid MikeMcQuaid deleted the cask_chmod_etc_stderr branch April 1, 2024 15:32
@github-actions github-actions bot added the outdated PR was locked due to age label May 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 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.

3 participants