Log download/unpack errors

Summary: ^

Reviewed By: ivanmisuno

Differential Revision: D49637030

fbshipit-source-id: 0e9925bd435e7843a57d6a8917f8da4e5e35640c
This commit is contained in:
Lorenzo Blasa
2023-09-27 03:34:01 -07:00
committed by Facebook GitHub Bot
parent 708db9003a
commit cb86f0f90b

View File

@@ -499,6 +499,7 @@ async function download(url: string, dest: string): Promise<void> {
});
})
.on('error', (error: Error) => {
console.log(`❌ Download failed ${url}. Error: ${error}`);
fs.unlink(dest);
reject(error);
});
@@ -530,7 +531,7 @@ async function unpack(source: string, destination: string) {
console.log(`✅ Extraction completed.`);
} catch (error) {
console.error(
`⚙️ Error found whilst trying to extract '${source}'. Found: ${error}`,
` Error found whilst trying to extract '${source}'. Found: ${error}`,
);
}
}