entrez / roku.vim

Vim plugin for Roku development (Scenegraph/Brightscript)
https://www.vim.org/scripts/script.php?script_id=5828
12 stars 3 forks source link

dummied out entries in /etc/hosts are not ignored #19

Closed entrez closed 5 years ago

entrez commented 5 years ago

issue

if g:roku_ip is set to a hostname defined in the local hosts file (e.g. rokutv), /etc/hosts is searched for a matching line. this search is very simple, though, and doesn't correctly exclude lines that start with the comment character #. in fact, those hash characters may even be included in the ip address extracted from the file, which obviously is no good.

to reproduce

run the following:

$ sudo echo '#10.192.21.29 notvalid' >> /etc/hosts
$ echo 'let g:roku_ip = "notvalid"' >> ~/.vimrc
$ vim channels/mychannel/manifest

then in vim:

:RokuInstall