`ouch list` output duplicates slashes of '.zip' archive when STDOUT is piped
Version
0.6.0
Description
When I run
$ ouch l ouch-aarch64-pc-windows-msvc.zip | head -n 5
Archive: /home/marcospb19/Downloads/ouch-releases/ouch-aarch64-pc-windows-msvc.zip
ouch-aarch64-pc-windows-msvc//
ouch-aarch64-pc-windows-msvc/man//
ouch-aarch64-pc-windows-msvc/man/ouch-decompress.1
ouch-aarch64-pc-windows-msvc/man/ouch-compress.1
I see duplicated slashes when it's a directory.
This archive was created with zip -r output input.
When I recreate it with Ouch itself, it doesn't do that.
Could be that CLI zip adds a / at the path, but we are also adding a / when outputting.
This issue seems unable to be reproduced on linux os. And I am sorry I don't have windows os lol.
Hey @tommady that'd only happen if the output is piped so you'd need to change ouch l a.zip to ouch l a.zip | head -n 5 :) .
This issue still exists for me. Tested on a GitHub tarball with both fish and bash, ouch 0.6.1 from nixpkgs, x86_64-linux on NixOS. The issue was never Windows specific from what I can tell either: the zip file @marcospb19 used to test it happened to be an ouch archive for Windows, but if you look at the Archive: line, it's a UNIX path.
EDIT: I just realized there hasn't been a new release in a while so the fixes wouldn't be there yet. compiling from source made it work as expected.