mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
5
.changes/throw-error-on-cli-download-failure.md
Normal file
5
.changes/throw-error-on-cli-download-failure.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Throw error on `cli.rs` download failure instead of silent exit.
|
||||
@@ -40,7 +40,10 @@ async function downloadBinaryRelease(
|
||||
// TODO: Check hash of download
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, security/detect-non-literal-fs-filename
|
||||
await pipeline(got.stream(url), fs.createWriteStream(outPath)).catch((e) => {
|
||||
removeDownloadedCliIfNeeded()
|
||||
try {
|
||||
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
||||
fs.unlinkSync(outPath)
|
||||
} catch {}
|
||||
throw e
|
||||
})
|
||||
// eslint-disable-next-line security/detect-object-injection
|
||||
|
||||
Reference in New Issue
Block a user