Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listner.class expects utils.inspect to be available #421

Merged
merged 1 commit into from
Feb 26, 2013
Merged

listner.class expects utils.inspect to be available #421

merged 1 commit into from
Feb 26, 2013

Conversation

omares
Copy link

@omares omares commented Feb 26, 2013

In the version of hubot 2.4.7 the listner class expects the utils.inspect method to be available. See L22 of inspect.coffee.

@robot.logger.debug "Message '#{message}' matched regex /#{inspect @regex}/" if @regex

Unfortunately the require on the util package is missing, so running hubot using the shell adapter throws following error.

bin/hubot -a shell
Hubot> hubot help
Hubot> [Tue Feb 26 2013 17:42:29 GMT+0100 (CET)] ERROR Unable to call the listener: ReferenceError: inspect is not defined
ReferenceError: inspect is not defined
    at TextListener.Listener.call (/Users/otamares/development/hubot/src/listener.coffee:20:82)
    at Robot.receive (/Users/otamares/development/hubot/src/robot.coffee:105:33)
    at Shell.Adapter.receive (/Users/otamares/development/hubot/src/adapter.coffee:37:25)
    at Interface.Shell.run (/Users/otamares/development/hubot/src/adapters/shell.coffee:74:22)
    at Interface.EventEmitter.emit (events.js:96:17)
    at Interface._onLine (readline.js:200:10)
    at Interface._line (readline.js:518:8)
    at Interface._ttyWrite (readline.js:736:14)
    at ReadStream.onkeypress (readline.js:97:10)
    at ReadStream.EventEmitter.emit (events.js:126:20)

Adding the appropriate require fixes the error

inspect = require('util').inspect;

tombell pushed a commit that referenced this pull request Feb 26, 2013
listner.class expects utils.inspect to be available
@tombell tombell merged commit 87650d3 into hubotio:master Feb 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants