Anonymous avatar Anonymous committed 937e442

fix issue41 - quoting should work better now for deps using "<" or ">"

Comments (0)

Files changed (3)
+- fix issue41 better quoting on windows - you can now use "<" and ">" in
+  deps specifications, thanks Chris Withers for reporting


         action.popen(["echo", ])
         match ="logpopen")
         assert match[1].outpath.relto(mocksession.config.logdir)
-        assert match[1].shell == (sys.platform == "win32")
+        assert match[1].shell == False
     def test_summary_status(self, initproj, capfd):
         initproj("logexample123-0.5", filedefs={
         f = outpath = None
         if redirect:
             f = self._initlogpath(
-            f.write("actionid=%s\nmsg=%s\ncmd=%s\nenv=%s\n" %(
-          , self.msg, logged_command, env))
+            f.write("actionid=%s\nmsg=%s\ncmdargs=%r\nenv=%s\n" %(
+          , self.msg, args, env))
             outpath = py.path.local(
         if cwd is None:
     def _rewriteargs(self, cwd, args):
         newargs = []
         for arg in args:
-            if isinstance(arg, py.path.local):
+            if sys.platform != "win32" and isinstance(arg, py.path.local):
                 arg = cwd.bestrelpath(arg)
         return newargs
     def _popen(self, args, cwd, stdout, stderr, env=None):
         args = self._rewriteargs(cwd, args)
-        #args = [str(x) for x in args]
         if env is None:
             env = os.environ.copy()
-        shell = (sys.platform == "win32")
-        return self.session.popen(args, shell=shell, cwd=str(cwd),
-	        stdout=stdout, stderr=stderr, env=env)
+        return self.session.popen(args, shell=False, cwd=str(cwd),
+            stdout=stdout, stderr=stderr, env=env)
 class Reporter(object):
     actionchar = "-"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.