[diffoscope] 01/02: Run zipinfo on /dev/stdin instead of a variable path. (Closes: #879011)
Ximin Luo
infinity0 at debian.org
Tue Nov 28 19:49:47 CET 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository diffoscope.
commit 25fee28c8b29dbc66cd7bb57a2ab427651050c23
Author: Ximin Luo <infinity0 at debian.org>
Date: Tue Nov 28 19:46:38 2017 +0100
Run zipinfo on /dev/stdin instead of a variable path. (Closes: #879011)
---
diffoscope/comparators/zip.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/diffoscope/comparators/zip.py b/diffoscope/comparators/zip.py
index 0815ddc..0ab60f5 100644
--- a/diffoscope/comparators/zip.py
+++ b/diffoscope/comparators/zip.py
@@ -35,7 +35,10 @@ from .utils.command import Command
class Zipinfo(Command):
@tool_required('zipinfo')
def cmdline(self):
- return ['zipinfo', self.path]
+ # zipinfo (without -v) puts warning messages (some of which contain
+ # $path) into stdin when stderr is not a tty, see #879011 for details.
+ # to work around it, we run it on /dev/stdin instead, seems to work ok.
+ return ['sh', '-ec', 'zipinfo /dev/stdin < "$1"', '-', self.path]
def filter(self, line):
# we don't care about the archive file path
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list