diff --git a/library/command b/library/command index b19e15e2e2d..8aa9899fc51 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)