提交 2f47eed8 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓) 提交者: GitHub

Merge pull request #76 from JasLin/master

about issue #70 : prepare to test this pr on cloud9
......@@ -138,20 +138,20 @@ function puppetInstance(instance: Puppet): void
function puppetInstance(instance?: Puppet | null): Puppet | void {
if (instance === undefined) {
if (!Config._puppetInstance) {
if (!global['_puppetInstance']) {
throw new Error('no puppet instance')
}
return Config._puppetInstance
return global['_puppetInstance']
} else if (instance === null) {
log.verbose('Config', 'puppetInstance(null)')
Config._puppetInstance = null
global['_puppetInstance'] = null
return
}
log.verbose('Config', 'puppetInstance(%s)', instance.constructor.name)
Config._puppetInstance = instance
global['_puppetInstance'] = instance
return
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册