1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Make a more logical error when the command/shell module is used with no arguments.

This commit is contained in:
Michael DeHaan 2012-08-16 21:40:52 -04:00
parent d35e930f2e
commit c93df29249

View file

@ -35,6 +35,8 @@ def main():
chdir = module.params['chdir'] chdir = module.params['chdir']
args = module.params['args'] args = module.params['args']
if args.strip() == '':
module.fail_json(msg="no command given")
if chdir: if chdir:
os.chdir(chdir) os.chdir(chdir)