mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Call os.path.expanduser in modules so things work as expected even when using ./hacking/test-module script
This commit is contained in:
parent
c6b8e1621d
commit
445e48b991
2 changed files with 4 additions and 4 deletions
|
@ -40,8 +40,8 @@ for x in items:
|
|||
(k, v) = x.split("=")
|
||||
params[k] = v
|
||||
|
||||
src = params['src']
|
||||
dest = params['dest']
|
||||
src = os.path.expanduser(params['src'])
|
||||
dest = os.path.expanduser(params['dest'])
|
||||
|
||||
|
||||
# raise an error if there is no src file
|
||||
|
|
|
@ -88,8 +88,8 @@ for x in items:
|
|||
params[k] = v
|
||||
|
||||
state = params.get('state','file')
|
||||
path = params.get('path', params.get('dest', params.get('name', None)))
|
||||
src = params.get('src', None)
|
||||
path = os.path.expanduser(params.get('path', params.get('dest', params.get('name', None))))
|
||||
src = os.path.expanduser(params.get('src', None))
|
||||
dest = params.get('dest', None)
|
||||
mode = params.get('mode', None)
|
||||
owner = params.get('owner', None)
|
||||
|
|
Loading…
Reference in a new issue