diff --git a/honcho/environ.py b/honcho/environ.py index 593926f..6f2862e 100644 --- a/honcho/environ.py +++ b/honcho/environ.py @@ -91,6 +91,8 @@ def parse(content): continue if not re.match(r'[A-Za-z_][A-Za-z_0-9]*', name): continue + + value = value.decode('string_escape') values[name] = value return values diff --git a/honcho/test/unit/test_environ.py b/honcho/test/unit/test_environ.py index e727d06..2558a49 100644 --- a/honcho/test/unit/test_environ.py +++ b/honcho/test/unit/test_environ.py @@ -102,7 +102,20 @@ MYVAR='sp ace' """, {'MYVAR': 'sp ace'} - ] + ], + [ + # Escaped characters in value + r""" + TABS='foo\tbar' + NEWLINES='foo\nbar' + VTAB='foo\vbar' + DOLLAR='foo\$bar' + """, + {'TABS': 'foo\tbar', + 'NEWLINES': 'foo\nbar', + 'VTAB': 'foo\vbar', + 'DOLLAR': 'foo\\$bar'} + ], ] PROCFILE_FIXTURES = [