1
0
Fork 0

Fix incorrect error message

pull/1552/head
Nikolai Laevskii 2023-10-09 07:02:21 +02:00
parent 508df3dce8
commit 1b1544c839
1 changed files with 3 additions and 1 deletions

View File

@ -77,7 +77,9 @@ export const getArchiveType = async (filePath: string): Promise<ArchiveType> =>
const closeEverythingAndReject = (error?: Error): void => { const closeEverythingAndReject = (error?: Error): void => {
readStream.close() 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) readStream.push(null)
} }