Skip to content

Commit a985b34

Browse files
authored
Merge pull request #4070 from quarto-dev/windows/tinytex-download-improvement
Improve TinyTeX installation speed on Windows
2 parents b3c70af + 33a51a0 commit a985b34

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/core/zip.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ export function unzip(file: string) {
1414
if (file.endsWith("zip")) {
1515
// It's a zip file
1616
if (Deno.build.os === "windows") {
17-
const args = ["Expand-Archive", file, "-DestinationPath", dir];
18-
const quoted = requireQuoting(args);
17+
const args = [
18+
"-Command",
19+
`"& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('${file}', '${dir}'); }"`,
20+
];
1921
return safeWindowsExec(
2022
"powershell",
21-
quoted.args,
23+
args,
2224
(cmd: string[]) => {
2325
return execProcess(
2426
{

0 commit comments

Comments
 (0)