Fix shelling out to non-.exe commands from --interactive mode on
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 21 Jan 2009 18:39:33 +0000 (18:39 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 21 Jan 2009 18:39:33 +0000 (18:39 +0000)
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

src/engine/SCons/Script/Interactive.py

index 98a312bd3d48512a2d09dfe91f8fee6c30b5bdc2..05c5807167685adb8d5a49ea7f043fe7dc56a16e 100644 (file)
@@ -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: