mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixes win_path module, migrates from reg.(set|get)_key to reg.(set|get)_value
This commit is contained in:
parent
9e06d3f01a
commit
a2dc6f2dd7
1 changed files with 5 additions and 4 deletions
|
@ -146,11 +146,11 @@ def add(path, index=0):
|
|||
|
||||
# Add it to the Path
|
||||
sysPath.insert(index, path)
|
||||
regedit = __salt__['reg.set_key'](
|
||||
regedit = __salt__['reg.set_value'](
|
||||
'HKEY_LOCAL_MACHINE',
|
||||
'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
|
||||
'PATH',
|
||||
';'.join(sysPath),
|
||||
'PATH',
|
||||
'REG_EXPAND_SZ'
|
||||
)
|
||||
|
||||
|
@ -183,14 +183,15 @@ def remove(path):
|
|||
except ValueError:
|
||||
return True
|
||||
|
||||
regedit = __salt__['reg.set_key'](
|
||||
regedit = __salt__['reg.set_value'](
|
||||
'HKEY_LOCAL_MACHINE',
|
||||
'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
|
||||
'PATH',
|
||||
';'.join(sysPath),
|
||||
'PATH',
|
||||
'REG_EXPAND_SZ'
|
||||
)
|
||||
if regedit:
|
||||
return rehash()
|
||||
else:
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue