From 55a0ede58755cae4b9ef223d4c5b1f010298d734 Mon Sep 17 00:00:00 2001 From: Dimas Lanjaka Date: Wed, 1 Mar 2023 13:13:33 +0700 Subject: [PATCH] Using absolute path githooks (#616) --- .githooks/install.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.githooks/install.js b/.githooks/install.js index 5774839..644c33d 100644 --- a/.githooks/install.js +++ b/.githooks/install.js @@ -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.');