1. Jakub Stasiak
  2. tox


Jakub Stasiak  committed eab76f5

Add switch that disables redirecting apps output to log files

Comments (0)

Files changed (2)

File tox/_cmdline.py Modified

View file
  • Ignore whitespace
  • Hide word diff
     def popen(self, args, cwd=None, env=None, redirect=True):
         logged_command = "%s$ %s" %(cwd, " ".join(map(str, args)))
         f = outpath = None
-        if redirect:
+        if redirect and not self.session.config.option.nocapture:
             f = self._initlogpath(self.id)
             f.write("actionid=%s\nmsg=%s\ncmdargs=%r\nenv=%s\n" %(
                     self.id, self.msg, args, env))

File tox/_config.py Modified

View file
  • Ignore whitespace
  • Hide word diff
         help="force recreation of virtual environments")
     parser.add_argument("args", nargs="*",
         help="additional arguments available to command positional substition")
+    parser.add_argument("--nocapture", action="store_true", dest="nocapture",
+        default=False,
+        help="don't capture and redirect executed programs' output to log files")
     return parser
 class Config: