Browse files

Split error checks for more specific error messages

  • Loading branch information...
1 parent 2a9f7dd commit 637a4340baf80cb30741de5b1b213063c2056217 @carmstrong carmstrong committed Dec 15, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/scripts/
7 src/scripts/
@@ -26,8 +26,13 @@ module.exports = (robot) ->
if not cardName.length
msg.send "You must give the card a name"
+ if not process.env.HUBOT_TRELLO_KEY
+ msg.send "Error: Trello app key is not specified"
+ if not process.env.HUBOT_TRELLO_TOKEN
+ msg.send "Error: Trello token is not specified"
+ if not process.env.HUBOT_TRELLO_LIST
+ msg.send "Error: Trello list ID is not specified"
if not (process.env.HUBOT_TRELLO_KEY and process.env.HUBOT_TRELLO_TOKEN and process.env.HUBOT_TRELLO_LIST)
- msg.send "Please sepcify your Trello key, token, and list as environment variables"
createCard msg, cardName

0 comments on commit 637a434

Please sign in to comment.