mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix to handle user directory correctly (e.g. ~/.ansible/tmp).
This commit is contained in:
parent
94fa741f96
commit
db4f6b8878
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ class VMwareInventory(object):
|
||||||
Saves the value to cache with the name given.
|
Saves the value to cache with the name given.
|
||||||
'''
|
'''
|
||||||
if self.config.has_option('defaults', 'cache_dir'):
|
if self.config.has_option('defaults', 'cache_dir'):
|
||||||
cache_dir = self.config.get('defaults', 'cache_dir')
|
cache_dir = os.path.expanduser(self.config.get('defaults', 'cache_dir'))
|
||||||
if not os.path.exists(cache_dir):
|
if not os.path.exists(cache_dir):
|
||||||
os.makedirs(cache_dir)
|
os.makedirs(cache_dir)
|
||||||
cache_file = os.path.join(cache_dir, name)
|
cache_file = os.path.join(cache_dir, name)
|
||||||
|
|
Loading…
Reference in a new issue