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

Merge pull request #7778 from toddmowen/unarchive-detect-error

unarchive: improve failure detection and reporting
This commit is contained in:
James Cammarata 2014-06-16 10:04:03 -05:00
commit 3baed58eed

View file

@ -234,7 +234,9 @@ def main():
# do the unpack
try:
results = handler.unarchive()
res_args['extract_results'] = handler.unarchive()
if res_args['extract_results']['rc'] != 0:
module.fail_json(msg="failed to unpack %s to %s" % (src, dest), **res_args)
except IOError:
module.fail_json(msg="failed to unpack %s to %s" % (src, dest))