提交 6228a6d2 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

up more

上级 2ae6facd
......@@ -123,11 +123,22 @@ export abstract class Puppet extends EventEmitter implements Sayable {
/**
* 2. Load the package.json for Puppet Plugin version range matching
*
* For: dist/src/puppet/puppet.ts
* We need to up 3 times: ../../../package.json
*/
try {
this.pkg = require('../package.json')
} catch (e) {
this.pkg = require('../../package.json')
try {
this.pkg = require('../../package.json')
} catch (e) {
try {
this.pkg = require('../../../package.json')
} catch (e) {
//
}
}
} finally {
if (!this.pkg) {
throw new Error('Cannot found package.json for Puppet Plugin Module')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册