From f1bedd95807f46ff468da699e19841eb01362852 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 11 Oct 2022 09:05:42 -0400 Subject: [PATCH] Fix type errors Signed-off-by: Sebastian Malton --- src/common/utils/tar.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)); }, });