Bug 1265063 - Fix the shell quoting regexp to properly match backslashes. r?gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 16 Apr 2016 20:14:00 +0900
changeset 352266 def2e70f504fcf1e1da92665145ab0e20b1e631a
parent 352038 f84123a66e198c7c6f17aab04e65e28bdc92896e
child 518628 c9e1781975923b5ed7fc894e52d224aeee964dbc
push id15666
push userbmo:mh+mozilla@glandium.org
push dateSat, 16 Apr 2016 11:15:29 +0000
reviewersgps
bugs1265063
milestone48.0a1
Bug 1265063 - Fix the shell quoting regexp to properly match backslashes. r?gps
python/mozbuild/mozbuild/shellutil.py
--- a/python/mozbuild/mozbuild/shellutil.py
+++ b/python/mozbuild/mozbuild/shellutil.py
@@ -36,17 +36,17 @@ DOUBLY_QUOTED_TOKENS_RE = _tokens2re(
   special='\$',
   backslashed=r'\\[^\\"]',
 )
 
 ESCAPED_NEWLINES_RE = re.compile(r'\\\n')
 
 # This regexp contains the same characters as all those listed in
 # UNQUOTED_TOKENS_RE. Please keep in sync.
-SHELL_QUOTE_RE = re.compile('[\\\t\r\n \'\"#<>&|`~(){}$;\*\?]')
+SHELL_QUOTE_RE = re.compile(r'[\\\t\r\n \'\"#<>&|`~(){}$;\*\?]')
 
 
 class MetaCharacterException(Exception):
     def __init__(self, char):
         self.char = char
 
 
 class _ClineSplitter(object):