From d2c8e08a6cac306be54d9087110fd5c10ffd7ac1 Mon Sep 17 00:00:00 2001 From: philipkirkland Date: Thu, 7 Jul 2022 16:19:50 +1000 Subject: [PATCH] Change permissions on generated pre-commit file from 777 to 775 so it adheres to CIS 6.1.10 This fixes issue https://github.com/observing/pre-commit/issues/160 --- install.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.js b/install.js index e24fc0d..fc7def7 100644 --- a/install.js +++ b/install.js @@ -121,10 +121,10 @@ catch (e) { console.error('pre-commit:'); } -try { fs.chmodSync(precommit, '777'); } +try { fs.chmodSync(precommit, '775'); } catch (e) { console.error('pre-commit:'); - console.error('pre-commit: chmod 0777 the pre-commit file in your .git/hooks folder because:'); + console.error('pre-commit: chmod 0775 the pre-commit file in your .git/hooks folder because:'); console.error('pre-commit: '+ e.message); console.error('pre-commit:'); }