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:
trav90
2018-08-11 16:24:30 -05:00
committed by Roy Tam
parent 37bb4f9108
commit cfdaeb9645
+7 -1
View File
@@ -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)))