From 51e85b4bdee1055b4e1eeba4f6aacfddc0a31585 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. --- command | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command b/command index b19e15e2e2d..8aa9899fc51 100755 --- a/command +++ b/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)