Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
774 views
in Technique[技术] by (71.8m points)

drush - Getting /bin/bash: -c: line 0: unexpected EOF while looking for matching `''

I have a problem with my Gitbash. whenever I am running below drush command I am getting error

command : drush @site sqlq "select * from tablename"

error : /bin/bash: -c: line 0: unexpected EOF while looking for matching `'' /bin/bash: -c: line 1: syntax error: unexpected end of file

I tried to run simple drush commands like drush @site cc all and they are working fine.

Is this issue related to system configurations or any environment variable related problem? I tried to run this command in other system and it is working fine. I am not able to figure out what is the issue here Please help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Git bash means Git for Windows.

Check first your .bashrc (in %USERPROFILE%): if you have one, make sure it does not echo any string to stdout when executed (you can see that by typing in git bash source /c/Users/<You>/.bashrc.

Then try again with a git bash done from a CMD where you set a simplified PATH

For testing, download [PortableGit-2.17.0-64-bit.7z.exe][2] and uncompress its content anywhere you want.

set G=c:patholatestgit
set PATH=%G%in;%G%usrin;%G%mingw64in
set PATH=%PATH%;C:windowssystem32;C:windowsSystem32Wbem;C:windowsSystem32WindowsPowerShellv1.0

Add also the PATH for the drush command, then try again said command in a git bash done from that CMD with that simplified PATH.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...