1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

homebrew_cask: Pass install_options during uninstall (#44938)

Until https://github.com/Homebrew/homebrew-cask/issues/40866 is fixed,
install_options should be passed when uninstalling casks to ensure that
all artefacts are removed.
This commit is contained in:
newtonne 2018-09-25 12:21:52 +01:00 committed by John R Barker
parent f20938788a
commit aac1ce7333

View file

@ -651,10 +651,12 @@ class HomebrewCask(object):
) )
raise HomebrewCaskException(self.message) raise HomebrewCaskException(self.message)
cmd = [opt opts = (
for opt in (self.brew_path, 'cask', 'uninstall', self.current_cask) [self.brew_path, 'cask', 'uninstall', self.current_cask]
if opt] + self.install_options
)
cmd = [opt for opt in opts if opt]
rc, out, err = self.module.run_command(cmd) rc, out, err = self.module.run_command(cmd)
if not self._current_cask_is_installed(): if not self._current_cask_is_installed():