From c93df29249b6b127b3768a17e973990ce371eb6e Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 16 Aug 2012 21:40:52 -0400 Subject: [PATCH] Make a more logical error when the command/shell module is used with no arguments. --- library/command | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/command b/library/command index b19e15e2e2..8aa9899fc5 100755 --- a/library/command +++ b/library/command @@ -35,6 +35,8 @@ def main(): chdir = module.params['chdir'] args = module.params['args'] + if args.strip() == '': + module.fail_json(msg="no command given") if chdir: os.chdir(chdir)