fix git hook install check

This commit is contained in:
Evan You
2015-10-09 20:58:45 -04:00
parent 04e93efccf
commit 0f98ea22fc

View File

@@ -32,16 +32,14 @@ const METEOR_HOOK_SUFFIX = '.meteor-hook';
const METEOR_HOOK_LINE_REGEX = /.*meteor-hook.*/;
export default function installGitHooks() {
// ensure the hooks folder is present
files.mkdir_p(hookDestination);
if (!files.exists(hookDestination)) {
// Don't do anything if the hook destination does not exist, eg.,
// we are not running from a git clone.
return;
}
allPossibleHooks.map((hookName) => {
if (!files.exists(hookDestination)) {
// Don't do anything if the hook destination does not exist, eg.,
// we are not running from a git clone.
return;
}
const hookFile = files.pathJoin(hookDestination, hookName);
const sourceFile = files.pathJoin(hookSource, hookName);
const meteorHookFile = hookFile + METEOR_HOOK_SUFFIX;