import { getCommand } from '../../../../code/tool/shared/command.js';
// check if corrupted
// zip -T filename.zip
// 7z t file.zip
export function buildCommandToDecompressWith7z(input) {
    const cmd = getCommand(`7z`);
    cmd.link.push(`x`, `"${input.input.path}"`, `-o`, `"${input.output.file.path}"`);
    return [cmd];
}
export function buildCommandToDecompressWithUnarchiver(input) {
    const cmd = getCommand(`unar`);
    cmd.link.push(`${input.input.file.path}`, `-o`, `${input.output.directory.path}`);
    cmd.link.push('--quiet');
    if (input.output.overwrite) {
        cmd.link.push(`-f`);
    }
    if (input.input.password) {
        cmd.link.push(`-p`, input.input.password);
    }
    return [cmd];
}
// https://github.com/ashang/unar/blob/master/README.md
//# sourceMappingURL=command.js.map