fix: import error caused by dependency upgrade

This commit is contained in:
huzibaca 2024-11-12 19:35:56 +08:00
parent a681fdeee1
commit 9e4a8708e7
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302

View File

@ -1,7 +1,7 @@
import fs from "fs";
import fsp from "fs/promises";
import zlib from "zlib";
import tar from "tar";
import { extract } from "tar";
import path from "path";
import AdmZip from "adm-zip";
import fetch from "node-fetch";
@ -232,7 +232,7 @@ async function resolveSidecar(binInfo) {
} else if (zipFile.endsWith(".tgz")) {
// tgz
await fsp.mkdir(tempDir, { recursive: true });
await tar.extract({
await extract({
cwd: tempDir,
file: tempZip,
//strip: 1, // 可能需要根据实际的 .tgz 文件结构调整