Skip to content

Commit

Permalink
unarchive: improve failure detection and reporting
Browse files Browse the repository at this point in the history
Related to ansible#7777
  • Loading branch information
Todd Owen committed Jun 15, 2014
1 parent 3fb3e7e commit a4fe910
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/files/unarchive
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit a4fe910

Please sign in to comment.