diff --git a/src/common/utils/tar.ts b/src/common/utils/tar.ts index 58008dfe9d..3102098976 100644 --- a/src/common/utils/tar.ts +++ b/src/common/utils/tar.ts @@ -5,7 +5,6 @@ // Helper for working with tarball files (.tar, .tgz) // Docs: https://github.com/npm/node-tar -import type { FileStat } from "tar"; import tar from "tar"; import path from "path"; import { parse } from "./json"; @@ -35,7 +34,7 @@ export function readFileFromTar({ tarPath, filePath, file: tarPath, filter: entryPath => path.normalize(entryPath) === filePath, sync: true, - onentry(entry: FileStat) { + onentry(entry) { entry.on("data", chunk => { fileChunks.push(chunk); }); @@ -63,7 +62,7 @@ export async function listTarEntries(filePath: string): Promise { await tar.list({ file: filePath, onentry: (entry) => { - entries.push(path.normalize(entry.path as unknown as string)); + entries.push(path.normalize(entry.path)); }, });