summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorSébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>2015-03-20 17:17:16 +0100
committerSébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>2015-03-20 17:17:16 +0100
commitb68c136010e4a7113f65a7a7bf5c52dc29c35b91 (patch)
treea5b47a8f0224bf68a1729cc9fdd4a320da2c24bb /files
parentcb848fcd9ec8364210fc05a5a7addd955b8a2529 (diff)
downloadansible-modules-extras-b68c136010e4a7113f65a7a7bf5c52dc29c35b91.tar.gz
[patch] Make sure patch command is found on remote system.
Diffstat (limited to 'files')
-rwxr-xr-x[-rw-r--r--]files/patch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/files/patch.py b/files/patch.py
index cd4b3130..314a1bc3 100644..100755
--- a/files/patch.py
+++ b/files/patch.py
@@ -141,6 +141,8 @@ def main():
p.basedir = path.dirname(p.dest)
patch_bin = module.get_bin_path('patch')
+ if patch_bin is None:
+ module.fail_json(msg="patch command not found")
patch_func = lambda opts: module.run_command("%s %s" % (patch_bin, ' '.join(opts)))
changed = False