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
fix: fileName had an excess dot
  • Loading branch information
aminya committed May 19, 2021
commit 601b7b55bfb006c53e2c58e4b4ed70902bb280be
4 changes: 2 additions & 2 deletions .npm/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ const path = require("path")
async function downloadBinary() {
// TODO zip the binaries to reduce the download size
aminya marked this conversation as resolved.
Show resolved Hide resolved
const downloadURL = getDownloadURL()
const extension = path.extname(downloadURL).slice(1)
const fileName = `lefthook.${extension}`
const extension = path.extname(downloadURL)
Envek marked this conversation as resolved.
Show resolved Hide resolved
const fileName = `lefthook${extension}`
const binDir = path.join(__dirname, "bin")
const dl = new DownloaderHelper(downloadURL, binDir, {
fileName,
Expand Down