Expand env vars throughout command lines
When converting strings to command lines interpret env vars in all the parts of the command line not just the first item. Fixes #1535
This commit is contained in:
parent
8969206450
commit
5953c2097d
@ -37,9 +37,8 @@ def to_bool(x):
|
|||||||
|
|
||||||
|
|
||||||
def to_cmdline(x):
|
def to_cmdline(x):
|
||||||
ans = shlex.split(x)
|
return list(map(
|
||||||
ans[0] = os.path.expandvars(os.path.expanduser(ans[0]))
|
lambda y: os.path.expandvars(os.path.expanduser(y)), shlex.split(x)))
|
||||||
return ans
|
|
||||||
|
|
||||||
|
|
||||||
def python_string(text):
|
def python_string(text):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user