From 12c75ab6dce3b19ee7e422ea12ab1743753d6b10 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Tue, 20 May 2014 01:43:25 -0700 Subject: [PATCH] chore(scripts): init-dev-env.js will create .git/hooks --- scripts/init-dev-env.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/init-dev-env.js b/scripts/init-dev-env.js index 5b4ee6c37..8848c3937 100755 --- a/scripts/init-dev-env.js +++ b/scripts/init-dev-env.js @@ -25,6 +25,10 @@ var gitHookSetup = function() { } console.log('Adding symbolic link: %s linked to %s', scriptPath, gitHookPath); + try { + // "hooks" may not exist + fs.mkdirSync(path.dirname(gitHookPath)); + } catch (e) {} fs.symlinkSync(scriptPath, gitHookPath, 'file'); };