hubot-heroku
hubot-heroku copied to clipboard
config:set command doesn't match up characters
When using the config:set
command with a value that contains a hash and an array, such as:
hubot heroku config:set my_app HUBOT_GITHUB_REPOS_MAP={"web":["frontend","web"],"android":["android"],"ios":["ios"],"platform":["web"]}
The regex in scripts/heroku-commands.js#L235 doesn't match up on the last 3 characters, resulting in a broken config setting.
But if I wrap it up in double quotes:
hubot heroku config:set my_app HUBOT_GITHUB_REPOS_MAP="{"web":["frontend","web"],"android":["android"],"ios":["ios"],"platform":["web"]}"
Its OK, since the matches on \b
.
I'm not sure what the best way to fix this is. The easiest is just to drop the \b
from the regex but I'm not entirely sure why it was added in the first place (I'm assuming it was to catch some edge case).