From: stevenknight Date: Wed, 21 Jan 2009 18:39:33 +0000 (+0000) Subject: Fix shelling out to non-.exe commands from --interactive mode on X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a2699adf3d274b725219b59296707f42a75d8c2c;p=scons.git Fix shelling out to non-.exe commands from --interactive mode on Windows by accomodating platform-specific behavior in the way subprocess.Popen() calls handle shell= arguments with lists. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3915 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Script/Interactive.py b/src/engine/SCons/Script/Interactive.py index 98a312bd..05c58071 100644 --- a/src/engine/SCons/Script/Interactive.py +++ b/src/engine/SCons/Script/Interactive.py @@ -354,7 +354,11 @@ class SConsInteractiveCmd(cmd.Cmd): if not argv: argv = os.environ[self.shell_variable] try: - p = subprocess.Popen(argv) + # Per "[Python-Dev] subprocess insufficiently platform-independent?" + # http://mail.python.org/pipermail/python-dev/2008-August/081979.html "+ + # Doing the right thing with an argument list currently + # requires different shell= values on Windows and Linux. + p = subprocess.Popen(argv, shell=(sys.platform=='win32')) except EnvironmentError, e: sys.stderr.write('scons: %s: %s\n' % (argv[0], e.strerror)) else: