fix(pre): use path
instead of name
at verification hook object
This commit is contained in:
parent
7ba1cb956f
commit
fd4c4d1c81
@ -38,10 +38,11 @@ module.exports = function (options, plugins, cb) {
|
|||||||
var opts = {}
|
var opts = {}
|
||||||
|
|
||||||
if (typeof plugins.verification === 'string') {
|
if (typeof plugins.verification === 'string') {
|
||||||
opts.name = plugins.verification
|
opts.path = plugins.verification
|
||||||
}
|
}
|
||||||
if (typeof plugins.verification === 'object') {
|
if (typeof plugins.verification === 'object') {
|
||||||
opts = plugins.verification
|
opts = plugins.verification
|
||||||
|
opts.path = opts.path || opts.name
|
||||||
}
|
}
|
||||||
|
|
||||||
opts.type = type
|
opts.type = type
|
||||||
@ -49,7 +50,7 @@ module.exports = function (options, plugins, cb) {
|
|||||||
opts.version = res.version
|
opts.version = res.version
|
||||||
opts.nextVersion = pkg.version
|
opts.nextVersion = pkg.version
|
||||||
|
|
||||||
var verification = require(opts.name)
|
var verification = require(opts.path)
|
||||||
|
|
||||||
console.log('Running verification hook...')
|
console.log('Running verification hook...')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user