mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 14:54:25 +00:00
Shell quote environment variable values when dumping them in dump_env.py
The mozconfig output parsing code already (mostly) handles shell quoted strings, because that's what `set` outputs. By quoting environment variable values, we avoid a bunch of problems with "weird" values.
This commit is contained in:
@@ -6,5 +6,11 @@
|
||||
# native paths printed on Windows so that these paths can be incorporated
|
||||
# into Python configure's environment.
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
|
||||
from shellutil import quote
|
||||
|
||||
for key, value in os.environ.items():
|
||||
print('%s=%s' % (key, value))
|
||||
print('%s=%s' % (key, quote(value)))
|
||||
|
||||
Reference in New Issue
Block a user