node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

Fix logger templates output issue #441

Closed henvic closed 8 years ago

henvic commented 8 years ago

Fixes logger templates output issue caused by de10722ca536423cbb6b0d20a528ea452efb8337 Related: #434

$ gh pr -s henvic
Submitting pull request to @henvic
Everything up-to-date
https://github.com/henvic/gh-test/pull/40
[hook] gh pr --browser --user henvic --repo gh-test --number 40
/Users/henvic/projects/gh/lib/logger.js:176
        return this.config.github_host + this.options.submit + '/' + this.options.repo + '/pull/' +
                          ^

TypeError: Cannot read property 'github_host' of undefined
    at Object.<anonymous> (/Users/henvic/projects/gh/lib/logger.js:176:27)
    at Object.eval (eval at createFunctionContext (/Users/henvic/projects/gh/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:254:23), <anonymous>:10:191)
    at main (/Users/henvic/projects/gh/node_modules/handlebars/dist/cjs/handlebars/runtime.js:173:32)
    at ret (/Users/henvic/projects/gh/node_modules/handlebars/dist/cjs/handlebars/runtime.js:176:12)
    at ret (/Users/henvic/projects/gh/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:525:21)
    at Object.logger.compileTemplate (/Users/henvic/projects/gh/lib/logger.js:129:37)
    at /Users/henvic/projects/gh/lib/hooks.js:148:26
    at /Users/henvic/projects/gh/node_modules/async/lib/async.js:713:13
    at Immediate.iterate [as _onImmediate] (/Users/henvic/projects/gh/node_modules/async/lib/async.js:262:13)
    at tryOnImmediate (timers.js:534:15)