From b68c136010e4a7113f65a7a7bf5c52dc29c35b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gross?= Date: Fri, 20 Mar 2015 17:17:16 +0100 Subject: [PATCH] [patch] Make sure patch command is found on remote system. --- files/patch.py | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 files/patch.py diff --git a/files/patch.py b/files/patch.py old mode 100644 new mode 100755 index cd4b3130079..314a1bc37db --- 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