plugins: Call `require('./hooks')` at top level

pull/4492/head
Richard Hansen 2020-11-13 13:41:08 -05:00 committed by John McLear
parent 14a9479e69
commit ba4794cf8a
1 changed files with 1 additions and 2 deletions

View File

@ -1,4 +1,5 @@
const fs = require('fs').promises;
const hooks = require('./hooks');
var npm = require("npm/lib/npm.js");
var readInstalled = require("./read-installed.js");
var path = require("path");
@ -52,8 +53,6 @@ exports.formatHooks = function (hook_set_name) {
};
exports.callInit = function () {
var hooks = require("./hooks");
let p = Object.keys(defs.plugins).map(function(plugin_name) {
let plugin = defs.plugins[plugin_name];
let ep_init = path.normalize(path.join(plugin.package.path, ".ep_initialized"));