mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Make a more logical error when the command/shell module is used with no arguments.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user