dpkg --对于nano或sudo有效,但对于"go“或"go-junit-report”,它不起作用。因此,我的问题是,如何以编程方式检查go-junit-报告是否已安装,如果未安装,则将其安装。
安装:go get github.com/jstemmer/go-junit-report
在下面尝试-不工作
if ! type "go-junit-report -version" > /dev/null; then
## Install JUnit for golang for XML based report
go get github.com/jstemmer/go-junit-report
fi发布于 2022-10-31 06:59:30
下面的代码部分地适用于我(至少它的调用github.):
if hash go-junit-report 2>/dev/null; then
echo "go-junit-report installed"
else
go get github.com/jstemmer/go-junit-report
fihttps://stackoverflow.com/questions/74259336
复制相似问题