mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix homebrew linked/unlinked output.
This commit is contained in:
parent
91ac44a5bb
commit
097ce84336
1 changed files with 22 additions and 6 deletions
|
@ -626,9 +626,17 @@ class Homebrew(object):
|
||||||
if opt]
|
if opt]
|
||||||
|
|
||||||
rc, out, err = self.module.run_command(cmd)
|
rc, out, err = self.module.run_command(cmd)
|
||||||
self.changed_count += 1
|
|
||||||
self.changed = True
|
if rc == 0:
|
||||||
self.message = 'Package linked: {0}'.format(self.current_package)
|
self.changed_count += 1
|
||||||
|
self.changed = True
|
||||||
|
self.message = 'Package linked: {0}'.format(self.current_package)
|
||||||
|
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
self.failed = True
|
||||||
|
self.message = 'Package could not be linked: {0}.'.format(self.current_package)
|
||||||
|
raise HomebrewException(self.message)
|
||||||
|
|
||||||
def _link_packages(self):
|
def _link_packages(self):
|
||||||
for package in self.packages:
|
for package in self.packages:
|
||||||
|
@ -662,9 +670,17 @@ class Homebrew(object):
|
||||||
if opt]
|
if opt]
|
||||||
|
|
||||||
rc, out, err = self.module.run_command(cmd)
|
rc, out, err = self.module.run_command(cmd)
|
||||||
self.changed_count += 1
|
|
||||||
self.changed = True
|
if rc == 0:
|
||||||
self.message = 'Package unlinked: {0}'.format(self.current_package)
|
self.changed_count += 1
|
||||||
|
self.changed = True
|
||||||
|
self.message = 'Package unlinked: {0}'.format(self.current_package)
|
||||||
|
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
self.failed = True
|
||||||
|
self.message = 'Package could not be unlinked: {0}.'.format(self.current_package)
|
||||||
|
raise HomebrewException(self.message)
|
||||||
|
|
||||||
def _unlink_packages(self):
|
def _unlink_packages(self):
|
||||||
for package in self.packages:
|
for package in self.packages:
|
||||||
|
|
Loading…
Reference in a new issue