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

会有一股神秘感。 提交于 2019-11-28 06:06:22

问题


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.


回答1:


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:\path\to\latest\git
set PATH=%G%\bin;%G%\usr\bin;%G%\mingw64\bin
set PATH=%PATH%;C:\windows\system32;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.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.



来源:https://stackoverflow.com/questions/50245289/getting-bin-bash-c-line-0-unexpected-eof-while-looking-for-matching

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!