[jhbuild] [win] Use Windows shell (cmd.exe) so untar and patch works



commit 6dacbc8fc05a36dd6669f10bf2890fd393cc7377
Author: Craig Keogh <cskeogh adam com au>
Date:   Wed Apr 27 21:33:51 2011 +0930

    [win] Use Windows shell (cmd.exe) so untar and patch works
    
    tar and patch fail on Windows because they rely on pipe | and redirects
    <.

 jhbuild/utils/subprocess_win32.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/jhbuild/utils/subprocess_win32.py b/jhbuild/utils/subprocess_win32.py
index a9bccd1..bedc6da 100644
--- a/jhbuild/utils/subprocess_win32.py
+++ b/jhbuild/utils/subprocess_win32.py
@@ -111,10 +111,10 @@ class Popen(real_subprocess.Popen):
         for i in range(0,len(command)):
             command[i] = fix_path_for_msys(command[i])
 
-        # 'shell' flag will execute 'command' using cmd.exe, which is a waste
-        # of time.  We shall use sh.exe to execute programs which look like
-        # shell scripts.
-        if 'shell' in kws and kws['shell']:
+        # 'shell' flag will execute 'command' using cmd.exe. Don't use cmd.exe
+        # when running shell scripts.
+        if 'shell' in kws and kws['shell'] and len(command) > 0 \
+        and command[0] == 'sh':
             kws['shell'] = False
 
         # default Windows implementation of close_fds is useless, we have to



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]