2021-03-26 17:06:47 +08:00

8 lines
217 B
JavaScript

const { spawn } = require('child_process');
const subprocess = spawn('git', ['config', '--local', 'core.hooksPath', '.githooks/']);
subprocess.on('error', () => {
console.error('Failed to install git hook.');
});