Errors on editing files shared with Linux Guest from Windows host; linux host works fine

30 views
Skip to first unread message

Christopher Hacker

unread,
Dec 16, 2014, 11:11:47 AM12/16/14
to vagra...@googlegroups.com
New to vagrant and have my linux hosts working correctly for my team. Having issues with a couple of Windows 7 hosts for a Linux guest. 

Specifically, I'm running Vagrant 1.7.1 on Windows 7 Pro host with a Debian guest machine. 

Vagrant up works fine. Have git installed with Unix options enabled and "checkout as-is, commit as-is" enabled. Able to view web app locally on Windows host machine no problem. 

As soon as any edit in a js file is made on the host machine (using either Notepad++ or Sublime Text, both set to UTF8 and UNIX line endings) a javascript error throws in the web console: SyntaxError Illegal character. The code hasn't been copied and pasted, I don't see any characters in the editor when I"m showing all symbols and I don't see anything in a git diff of the file. 

Any one seen this before and know what to do or where else to look to get it running?

Alvaro Miranda Aguilera

unread,
Dec 16, 2014, 4:40:03 PM12/16/14
to vagra...@googlegroups.com
run dos2unix in the files

from the guest

dos2unix files*


if that fix the issue, then on notepad++ you need to change into unix character set.

The issue is with the enter / end of line 



--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christopher Hacker

unread,
Dec 16, 2014, 7:09:34 PM12/16/14
to vagra...@googlegroups.com
Alvaro, thanks. So dos2unix did work. But thing is, both Notepad++ and Sublime Text are set to Unix for EOL. 

Any ideas on what else to do to make it stick, or do I have to run dos2unix every time I make a change? 

Thanks again for the response. 

Christopher Hacker

https://www.myshorttrack.com

(773) 313-3169 o

(312) 205-0188 f


--
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/MFb2RNGUEm0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.

Alvaro Miranda Aguilera

unread,
Dec 16, 2014, 7:22:58 PM12/16/14
to vagra...@googlegroups.com
Hello,

I use ANSI UNIX on n++ and works fine.


Christopher Hacker

unread,
Dec 18, 2014, 1:01:23 PM12/18/14
to vagra...@googlegroups.com
Alvaro, 

You're a lifesaver, though my head hurts from the facepalm. :) Notepad++ was setting to utf-8 and switching it to ANSI fixed it. Thanks again!

Chris

Christopher Hacker

https://www.myshorttrack.com

(773) 313-3169 o

(312) 205-0188 f


Alvaro Miranda Aguilera

unread,
Dec 18, 2014, 3:43:31 PM12/18/14
to vagra...@googlegroups.com
all good!.. happy to assist.
Reply all
Reply to author
Forward
0 new messages