Skip to content

Commit

Permalink
Merge pull request #11 from Arkweid/feature/ignore-ci-for-postinstall
Browse files Browse the repository at this point in the history
Add CI check & prettify file
  • Loading branch information
Abroskin Alexander authored Jun 13, 2019
2 parents e4f9282 + 8c6c9f3 commit 0798844
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .npm/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
require('process');
const { spawn } = require('child_process');
require("process");
const { spawn } = require("child_process");

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

result = spawn('npx', ['lefthook', 'install']);
result = spawn("npx", ["lefthook", "install"]);

result.stdout.on('data', (data) => {
result.stdout.on("data", data => {
console.log(`${data}`);
});
});
}

0 comments on commit 0798844

Please sign in to comment.