2023-03-01 14:13:33 +08:00

9 lines
269 B
JavaScript

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