mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Using absolute path githooks (#616)
This commit is contained in:
parent
dcc5868438
commit
55a0ede587
@ -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.');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user