function extract
extract(
archivePath: string,
destination: string
): Promise<void>

Unpacks a release archive with the host's tar / unzip, falling back to PowerShell's Expand-Archive where a Windows shell has no unzip — the same two-step jsr/cli.ts uses, for the same reason: no JS extractor has to ship inside the binary.

import * as Install from './install.ts';

// Defined, not invoked: spawns tar and writes to disk.
async function unpack() {
  await Install.extract('/tmp/qunitx-deno-linux-x64.tar.gz', '/tmp/staging');
}

Parameters

archivePath: string
destination: string

Return Type

Promise<void>

Usage

import { extract } from "lib/commands/upgrade/install.ts";