Bug 785265 - Explicitely use sh -c instead of letting subprocess.Popen do it. r=ted

This commit is contained in:
Mike Hommey 2012-09-05 16:42:09 +02:00
parent 6802c70abe
commit 50dbad64d5
2 changed files with 4 additions and 5 deletions

View File

@ -771,9 +771,8 @@ class ShellFunction(Function):
cline = self._arguments[0].resolvestr(makefile, variables, setting)
log.debug("%s: running shell command '%s'" % (self.loc, cline))
if msys:
cline = [shell, "-c", cline]
p = subprocess.Popen(cline, env=makefile.env, shell=not msys,
cline = [shell, "-c", cline]
p = subprocess.Popen(cline, env=makefile.env, shell=False,
stdout=subprocess.PIPE, cwd=makefile.workdir)
stdout, stderr = p.communicate()

View File

@ -88,8 +88,8 @@ def call(cline, env, cwd, loc, cb, context, echo, justprint=False):
if msys:
if len(cline) > 3 and cline[1] == ':' and cline[2] == '/':
cline = '/' + cline[0] + cline[2:]
cline = [shell, "-c", cline]
context.call(cline, shell=not msys, env=env, cwd=cwd, cb=cb, echo=echo,
cline = [shell, "-c", cline]
context.call(cline, shell=False, env=env, cwd=cwd, cb=cb, echo=echo,
justprint=justprint)
return