Skip to content

-z option on Windows requires "gzip" no documented dependencies and no Errors in execution #1622

@cwitter

Description

@cwitter

What version of ripgrep are you using?

ripgrep 12.1.1 (rev 7cb2113)
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

How did you install ripgrep?

https://github.com/BurntSushi/ripgrep/releases/download/12.1.1/ripgrep-12.1.1-x86_64-pc-windows-msvc.zip

What operating system are you using ripgrep on?

Windows 10 Professional

Describe your bug.

Using ripgrep with the "-z" option and attempting to search GZip files it reports no errors when missing the "gzip" dependency.

What are the steps to reproduce the behavior?

rg -z -i info -g *

What is the actual behavior?

rg -z -i info -g * --debug

|crates\cli\src\decompress.rs:196: 2020-06-17-1.log.gz: error spawning command '"gzip" "-d" "-c" "2020-06-17-1.log.gz"': The system cannot find the file specified. (os error 2) (falling back to uncompressed reader)
DEBUG|grep_cli::decompress|crates\cli\src\decompress.rs:196: 2020-06-18-1.log.gz: error spawning command '"gzip" "-d" "-c" "2020-06-18-1.log.gz"': The system cannot find the file specified. (os error 2) (falling back to uncompressed reader)

What is the expected behavior?

No dependencies are listed for the Windows installation, expected behavior is it would work as expected or provide an error calling out the missing dependencies. Minor documentation updates to call out the requirements on Windows might help others as well.

What do you think ripgrep should have done?
Include a decompression error similar to the one in the "debug" output to inform the user of the failure.
With GNU Gzip installed and in the PATH everything works as expected for GZ files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docAn issue with or an improvement to documentation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions