From 1b1544c8394b8767579c46a22f5ddc248d887230 Mon Sep 17 00:00:00 2001 From: Nikolai Laevskii Date: Mon, 9 Oct 2023 07:02:21 +0200 Subject: [PATCH] Fix incorrect error message --- packages/tool-cache/src/archive/get-archive-type.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/tool-cache/src/archive/get-archive-type.ts b/packages/tool-cache/src/archive/get-archive-type.ts index 26ad06ef..c683fb5c 100644 --- a/packages/tool-cache/src/archive/get-archive-type.ts +++ b/packages/tool-cache/src/archive/get-archive-type.ts @@ -77,7 +77,9 @@ export const getArchiveType = async (filePath: string): Promise => const closeEverythingAndReject = (error?: Error): void => { readStream.close() - fs.close(fd, () => reject(error ?? Error('Unable to read file'))) + fs.close(fd, () => + reject(error ?? Error('Unable to determine archive type')) + ) readStream.push(null) }