Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm: download the required binaries during installation #188

Merged
merged 17 commits into from
Jun 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Both output console error and wrap custom message
  • Loading branch information
Envek committed May 26, 2021
commit c0c7e3da2b10d2a2a2b3819bb1abfdd008c0f74d
5 changes: 3 additions & 2 deletions .npm/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ async function downloadBinary() {
try {
await dl.start()
} catch(e) {
console.error(`Failed to download ${fileName} while fetching ${downloadURL}`)
throw e
const message = `Failed to download ${fileName}: ${e.message} while fetching ${downloadURL}`
console.error(message)
throw new Error(message)
}
return path.join(binDir, fileName)
}
Expand Down