Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

ml errors when run in cygwin #504

Closed
JackYoungblood opened this issue Aug 13, 2015 · 7 comments
Closed

ml errors when run in cygwin #504

JackYoungblood opened this issue Aug 13, 2015 · 7 comments
Labels
Milestone

Comments

@JackYoungblood
Copy link

Running roxy on cygwin on WIndows 7. When I issued an ml command I got the following error:
ml: line 17: $'\r': command not found
ml: line 20: syntax error near unexpected token``$'\r''
'l: line 20:```usage()

Some googling told me that this is a problem with unix vs. windows line ending/carriage returns. When I applied dos2unix ml the ml program ran just fine. However, every time it generates a new ml program for a new project the problem came back.

Some other searching suggested that setting a Windows System Environment Variable of SHELLOPTS=igncr would address this issue. However, I still get the error when the project specific cloned ml gets generated.

I seem to recall that when I installed cygwin I was asked how I want to handle carriage returns but I don't know what setting I chose or how to adjust this.

Any help is appreciated.

@kefo
Copy link

kefo commented Aug 13, 2015

Since you are in a windows environment, can you not run the .bat file? I've seen the same error in an cygwin install and I found that I could just run ml.bat instead.

./ml.bat local deploy modules

@JackYoungblood
Copy link
Author

I can run the .bat file. I just find this behavior curious because I've run
Roxy from cygwin prompt in the past.
On Aug 13, 2015 6:47 PM, "Kevin Ford" notifications@github.com wrote:

Since you are in a windows environment, can you not run the .bat file?
I've seen the same error in an cygwin install and I found that I could just
run ml.bat instead.

./ml.bat local deploy modules


Reply to this email directly or view it on GitHub
#504 (comment).

@kefo
Copy link

kefo commented Aug 14, 2015

Simple question, but curious: Does this happen when you clone the repository, or otherwise grab the current master or dev branch copy of ml?

I ask because I've been using a copy of Roxy of indeterminate date and I get the carriage return error. But, I just cloned the current repo and, using cygwin, do not get an error.

(I'm assuming 'yes'; just covering the bases.)

@rlouapre
Copy link
Contributor

I had the issue as well and decided (sadly) not to use roxy with cygwin.

git clone will use crlf git config to convert lf to crlf [1]. There is no .gitattribute in roxy project so it will use git global settings.

Maybe crlf could be applied only in sepcific files [2].

[1] - https://help.github.com/articles/dealing-with-line-endings/
[2] - http://stackoverflow.com/questions/19551037/git-how-to-keep-crlf-endings-for-specific-files-only

@grtjn
Copy link
Contributor

grtjn commented Aug 17, 2015

Thanks for reporting. I had trouble running Roxy properly in Windows as well. I also tried tools like gitbash, but that seems to fall short as well..

@grtjn
Copy link
Contributor

grtjn commented Sep 7, 2015

Learned how to fix this for my mlvagrant project, I'll add a .gitattributes for this as soon as I get to it!

@grtjn grtjn added the bug label Sep 17, 2015
@grtjn grtjn added this to the 1.7.3 milestone Sep 17, 2015
@grtjn grtjn self-assigned this Sep 17, 2015
grtjn added a commit to grtjn/roxy that referenced this issue Sep 21, 2015
dmcassel added a commit that referenced this issue Dec 14, 2015
Fixed #504: added eol=lf setting for ml script, and touched it
grtjn added a commit to grtjn/roxy that referenced this issue Jan 28, 2016
@grtjn
Copy link
Contributor

grtjn commented Mar 11, 2016

Fixed in dev..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants