From 13de3375c0c3cb6eba20facdd4eb9af7f5dad529 Mon Sep 17 00:00:00 2001 From: ViSaturn <88877968+ViSaturn@users.noreply.github.com> Date: Sat, 22 Mar 2025 16:29:57 +0300 Subject: [PATCH] Allow `ultimate_extractor` to unzip exe files (#1075) The unzip command can unzip exe files, this reflects that in `ultimate_extractor.nu` --- modules/data_extraction/ultimate_extractor.nu | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/data_extraction/ultimate_extractor.nu b/modules/data_extraction/ultimate_extractor.nu index 1fbe1de..298471a 100644 --- a/modules/data_extraction/ultimate_extractor.nu +++ b/modules/data_extraction/ultimate_extractor.nu @@ -1,20 +1,20 @@ # Function to extract archives with different extensions. export def extract [name:string] { let handlers = [ [extension command]; - ['tar\.bz2|tbz|tbz2' 'tar xvjf'] - ['tar\.gz|tgz' 'tar xvzf'] - ['tar\.xz|txz' 'tar xvf'] - ['tar\.Z' 'tar xvZf'] - ['bz2' 'bunzip2'] - ['deb' 'ar x'] - ['gz' 'gunzip'] - ['pkg' 'pkgutil --expand'] - ['rar' 'unrar x'] - ['tar' 'tar xvf'] - ['xz' 'xz --decompress'] - ['zip|war|jar|nupkg' 'unzip'] - ['Z' 'uncompress'] - ['7z' '7za x'] + ['tar\.bz2|tbz|tbz2' 'tar xvjf'] + ['tar\.gz|tgz' 'tar xvzf'] + ['tar\.xz|txz' 'tar xvf'] + ['tar\.Z' 'tar xvZf'] + ['bz2' 'bunzip2'] + ['deb' 'ar x'] + ['gz' 'gunzip'] + ['pkg' 'pkgutil --expand'] + ['rar' 'unrar x'] + ['tar' 'tar xvf'] + ['xz' 'xz --decompress'] + ['zip|war|jar|nupkg|exe' 'unzip'] + ['Z' 'uncompress'] + ['7z' '7za x'] ] let maybe_handler = ($handlers | where $name =~ $'\.(($it.extension))$') if ($maybe_handler | is-empty) {