mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-21 11:19:00 +00:00
homebrew_cask: fix false failure on upgrade of latest-versioned casks (#11838)
* homebrew_cask: fix false failure on upgrade of latest-versioned casks Use rc == 0 to determine upgrade success, consistent with _upgrade_all(). The previous check (_current_cask_is_installed() and not _current_cask_is_outdated()) was unreliable: for `latest`-versioned casks under --greedy, brew may still list the cask as outdated after a successful upgrade, causing the task to fail with a harmless warning from stderr as the error message. Fixes #1647 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * homebrew_cask: add changelog fragment for #11838 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix changelog fragment --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6c809dd9db
commit
d0d213a41d
2 changed files with 7 additions and 1 deletions
|
|
@ -656,7 +656,7 @@ class HomebrewCask:
|
|||
else:
|
||||
rc, out, err = self.module.run_command(cmd)
|
||||
|
||||
if self._current_cask_is_installed() and not self._current_cask_is_outdated():
|
||||
if rc == 0:
|
||||
self.changed_count += 1
|
||||
self.changed = True
|
||||
self.message = f"Cask upgraded: {self.current_cask}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue