mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Prevent error if module.params['path'] has no path included. (#50106)
This commit is contained in:
parent
01a1ce16ce
commit
f55481863d
1 changed files with 1 additions and 1 deletions
|
@ -272,7 +272,7 @@ def main():
|
|||
)
|
||||
|
||||
# Check if Path exists
|
||||
base_dir = os.path.dirname(module.params['path'])
|
||||
base_dir = os.path.dirname(module.params['path']) or '.'
|
||||
if not os.path.isdir(base_dir):
|
||||
module.fail_json(
|
||||
name=base_dir,
|
||||
|
|
Loading…
Add table
Reference in a new issue