mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07: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
|
# 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):
|
if not os.path.isdir(base_dir):
|
||||||
module.fail_json(
|
module.fail_json(
|
||||||
name=base_dir,
|
name=base_dir,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue