Skip to content

Commit

Permalink
Merge pull request #86 from sHooKDT/master
Browse files Browse the repository at this point in the history
Fixed path to binaries in postinstall script
  • Loading branch information
Abroskin Alexander authored Nov 9, 2019
2 parents 7404e90 + 3a2b381 commit c85ec9d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .npm/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
require("process");
const { spawn } = require("child_process");
const { join } = require("path");

const isCI = process.env.CI;
if (!isCI) {
process.chdir(process.env.INIT_CWD);

if (!isCI) {
if (process.platform === 'darwin') {
binary = 'lefthook-mac';
} else if (process.platform === 'linux') {
Expand All @@ -17,7 +15,7 @@ if (!isCI) {
process.exit(0);
}

binpath = join(process.cwd(), 'node_modules', '@arkweid', 'lefthook', 'bin', binary);
binpath = join(_dirname, 'bin', binary);

result = spawn(binpath, ["install", "-f"], { stdio: [process.stdin, process.stdout, process.stderr] });
}

0 comments on commit c85ec9d

Please sign in to comment.