本文介绍了VSCode,带有 Git Bash 的 Maven 扩展:bash:意外标记“&"附近的语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用扩展名maven for java"启动一个干净的命令,但是对于 Git Bash 终端,它对我不起作用,因为它添加了 &一开始,有人知道怎么解决吗?

参考:命令总是有前缀字符&"

I'm trying to launch a clean command with the extension "maven for java", but with the Git Bash terminal it doesn't work for me since it adds an & at the beginning, does anyone know how to solve it?

In powershell works fine

In Git bash doesn't works

Maven extension launcher

MADMAX@torre-madmax MINGW64 /f/GoogleDrive/informatica/Proyectos/PildorasInformaticas Spring/demo
$ & "/opt/apache-maven-3.8.1/bin/mvn" clean -f "f:\GoogleDrive\informatica\Proyectos\PildorasInformaticas Spring\demo\pom.xml"
bash: syntax error near unexpected token `&'
解决方案

This question is solved in VS Code Insider. You may code in Insider version temporarily, and it would be fixed in next VS Code release.

Reference: command always has prefix character "&"

这篇关于VSCode,带有 Git Bash 的 Maven 扩展:bash:意外标记“&"附近的语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 17:40