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

Merge pull request #3814 from ftao/inventory_dir_abs

fix inventory.basedir is not absolute path when hostfile is startswith "./"
This commit is contained in:
Michael DeHaan 2013-08-11 08:46:08 -07:00
commit 17aa0d12de

View file

@ -392,7 +392,7 @@ class Inventory(object):
if not self.is_file():
return None
dname = os.path.dirname(self.host_list)
if dname is None or dname == '':
if dname is None or dname == '' or dname == '.':
cwd = os.getcwd()
return cwd
return dname