You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ localdev list
/Library/Ruby/Gems/2.0.0/gems/psych-2.0.17/lib/psych.rb:376:in `parse': (<unknown>): could not find expected ':' while scanning a simple key at line 4 column 1 (Psych::SyntaxError)
from /Library/Ruby/Gems/2.0.0/gems/psych-2.0.17/lib/psych.rb:376:in `parse_stream'
from /Library/Ruby/Gems/2.0.0/gems/psych-2.0.17/lib/psych.rb:324:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/psych-2.0.17/lib/psych.rb:251:in `load'
from /Library/Ruby/Gems/2.0.0/gems/localdev-0.4.0/lib/localdev.rb:202:in `block in list'
from /Library/Ruby/Gems/2.0.0/gems/localdev-0.4.0/lib/localdev.rb:201:in `open'
from /Library/Ruby/Gems/2.0.0/gems/localdev-0.4.0/lib/localdev.rb:201:in `list'
from /Library/Ruby/Gems/2.0.0/gems/localdev-0.4.0/lib/localdev.rb:43:in `initialize'
from /Library/Ruby/Gems/2.0.0/gems/localdev-0.4.0/bin/localdev:22:in `new'
from /Library/Ruby/Gems/2.0.0/gems/localdev-0.4.0/bin/localdev:22:in `<top (required)>'
from /usr/local/bin/localdev:23:in `load'
from /usr/local/bin/localdev:23:in `<main>'
Emptying the hosts-localdev file fixed this. It would be great to have some kind of integrity check on the file, or at least a better error message.
The text was updated successfully, but these errors were encountered:
I think I've traced this issue to a script I'm using that runs localdev twice at the same time. I suspect that without any kind of locking mechanism, the writes to /etc/hosts-localdev are colliding. I can look at adding locking to prevent this, any suggestions about where to start are welcome.
ChrisHardie
changed the title
Handle corrupt hosts-localdev
Add locking / Handle corrupt hosts-localdev
Nov 8, 2016
Somehow my
/etc/hosts-localdev
file became populated in a way that led to errors with list/add/remove operations. It looked like:Then I'd get:
Emptying the hosts-localdev file fixed this. It would be great to have some kind of integrity check on the file, or at least a better error message.
The text was updated successfully, but these errors were encountered: