Fix expansion of env vars not working in the :opt:env directive

Fixes #1075
This commit is contained in:
Kovid Goyal 2018-10-18 08:12:10 +05:30
parent 093c05e16a
commit 7f902c4c03
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 6 additions and 2 deletions

View File

@ -22,6 +22,10 @@ Changelog
- macOS: Fix drag and drop of files not working on mojave (:iss:`1058`)
- Fix expansion of env vars not working in the :opt:`env` directive
(:iss:`1075`)
0.12.3 [2018-09-29]
------------------------------

View File

@ -337,7 +337,7 @@ def expandvars(val, env):
result = m.group()
return result
return re.sub(r'$\{(\S+)\}', sub, val)
return re.sub(r'\$\{(\S+?)\}', sub, val)
@special_handler

View File

@ -703,7 +703,7 @@ Specify environment variables to set in all child processes. Note that
environment variables are expanded recursively, so if you use::
env MYVAR1=a
env MYVAR2=${MYVAR}/${HOME}/b
env MYVAR2=${MYVAR1}/${HOME}/b
The value of MYVAR2 will be :code:`a/<path to home directory>/b`.
'''))