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

ml script breaks in gitbash (Windows) #333

Closed
grtjn opened this issue Jan 14, 2015 · 5 comments
Closed

ml script breaks in gitbash (Windows) #333

grtjn opened this issue Jan 14, 2015 · 5 comments
Labels

Comments

@grtjn
Copy link
Contributor

grtjn commented Jan 14, 2015

I was contacted that using ml in gitbash (http://git-scm.com/download/win) throws this error:

$ ./ml -v local mlcp
./ml: line 48: conditional binary operator expected
./ml: line 48: syntax error near `=~'
./ml: line 48: `      if ! [[ $response =~ ^(Y|y) ]]'

Apparently the =~ operator is not supported. Need to look for a different way to check $response.

@grtjn grtjn added the bug label Jan 14, 2015
@grtjn
Copy link
Contributor Author

grtjn commented Jan 14, 2015

Rewriting the if to this helps:

if [ $response != "Y" -a $response != "y" ]

@dmcassel
Copy link
Collaborator

Is that using cygwin? I notice you referred to "ml" rather than "ml.bat".

@grtjn
Copy link
Contributor Author

grtjn commented Jan 14, 2015

Yes, I mean 'ml', not 'ml.bat'. There are benefits to using a shell over a dos-box in Windows, particularly when working in a team with mixed OS. ;-)

GitBash actually, that is something that comes with 'Git for Windows', and I suspect with 'Github for Windows' as well. Not sure about cygwin, I would expect cygwin to be more powerful, so less picky about the syntax. My suggested alternative is more generic, so most likely to work everywhere..

@dmcassel
Copy link
Collaborator

Sounds good to me.

grtjn added a commit to grtjn/roxy that referenced this issue Jan 16, 2015
@dmcassel
Copy link
Collaborator

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

2 participants