Skip to content
Snippets Groups Projects
Commit 25fee28c authored by Ximin Luo's avatar Ximin Luo
Browse files

Run zipinfo on /dev/stdin instead of a variable path. (Closes: #879011)

parent 40fd9f56
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment