[英]Can IntelliJ run gradle task via bash.exe rather than Windows cmd.exe?
我使用IntelliJ为我的项目启动了一个gradle构建任务,但似乎IntelliJ正在使用命令提示符(或cmd.exe)来启动gradle包装器,因为在我构建期间我收到错误:
'cp' is not recognized as an internal or external command,
operable program or batch file.
我安装了git bash,从我的bash shell运行gradlew build
成功,没有任何这样的错误。
有没有办法告诉IntelliJ使用我的bash可执行文件来运行gradle任务而不是默认的Windows cmd.exe?
我尝试将默认的IntelliJ终端(文件 - >设置 - >终端)从cmd.exe更改为我的bash.exe,但这不起作用。
我通过将以下设置为我的默认终端,在Intillij中使用Bash for Windows终端。
cmd.exe "/K set LINES=9999&C:\windows\system32\bash.exe"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.