From 9216e612f0e9797d4f2dd84a97b890c3069b69c0 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Tue, 16 Feb 2016 16:18:03 -0500 Subject: scanner: Remove leading $SHELL in libtool call Avoid crashes due to double shell in subprocess.Popen() on linux, e.g.: ``` >>> import subprocess >>> subprocess.Popen(['/bin/sh', '/bin/sh']) /bin/sh: /bin/sh: cannot execute binary file ``` https://bugzilla.gnome.org/show_bug.cgi?id=761982 --- giscanner/ccompiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'giscanner/ccompiler.py') diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py index 9b27f0e1..021345ee 100644 --- a/giscanner/ccompiler.py +++ b/giscanner/ccompiler.py @@ -277,7 +277,8 @@ class CCompiler(object): else: libtool = utils.get_libtool_command(options) if libtool: - args.append(utils.which(os.environ.get('SHELL', 'sh.exe'))) + if os.name == 'nt': + args.append(utils.which(os.environ.get('SHELL', 'sh.exe'))) args.extend(libtool) args.append('--mode=execute') # FIXME: it could have prefix (i686-w64-mingw32-dlltool.exe) -- cgit v1.2.1