defunkt/hub — Issue #131: JSON parse of `git checkout https://github.com/puppetlabs/puppet/pull/390` fails
Author: daniel-pittman
Created: 2012-01-23 17:28:59+00:00
State: open

I get a syntax error in the `eval str` part of hub when running `git checkout https://github.com/puppetlabs/puppet/pull/390`.

It looks like there is not enough escaping of Ruby-style code in there:

⚡ git checkout https://github.com/puppetlabs/puppet/pull/390
/Users/daniel/bin/hub:1435:in `string': (eval):1:in `string': compile error (SyntaxError)
(eval):1: syntax error, unexpected '}', expecting ')'
...:Face.colorize(:red, 'string'}\"\r\n\r\nRelated spec tests a...
^
(eval):1: syntax error, unexpected $end, expecting '}'
...ated spec tests are included."
^
from /Users/daniel/bin/hub:1405:in `eval'
from /Users/daniel/bin/hub:1435:in `string'
from /Users/daniel/bin/hub:1405:in `value'
from /Users/daniel/bin/hub:1416:in `hash'
from /Users/daniel/bin/hub:1399:in `object'
from /Users/daniel/bin/hub:1405:in `value'
from /Users/daniel/bin/hub:1416:in `hash'
from /Users/daniel/bin/hub:1399:in `object'
from /Users/daniel/bin/hub:1394:in `parse'
from /Users/daniel/bin/hub:1381:in `parse'
from /Users/daniel/bin/hub:806:in `checkout'
from /Users/daniel/bin/hub:603:in `send'
from /Users/daniel/bin/hub:603:in `run'
from /Users/daniel/bin/hub:1445:in `initialize'
from /Users/daniel/bin/hub:1449:in `new'
from /Users/daniel/bin/hub:1449:in `execute'
from /Users/daniel/bin/hub:1498