mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
fix git hook install check
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user