Using absolute path githooks (#616)

This commit is contained in:
Dimas Lanjaka 2023-03-01 13:13:33 +07:00 committed by GitHub
parent dcc5868438
commit 55a0ede587
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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