我正在尝试发送代码覆盖率报告,该报告是由Slather to Codacy使用Fastlane创建的。这是一条小路:
desc "Do A Slather and send to Codacy"
lane :code_coverage do |options|
slather(output_directory: "SlatherReports", scheme: "MyApp", configuration: "Debug", workspace: "MyApp.xcworkspace", proj: "MyApp.xcodeproj", cobertura_xml: true, use_bundle_exec: true)
ENV["CODACY_PROJECT_TOKEN"] = options[:codacy_token]
sh "bash <(curl -Ls https://coverage.codacy.com/get.sh -r SlatherReports/cobertura.xml)"
end“奴隶”运行,但bash脚本没有工作。它返回了以下错误:
06:40:19:命令'bash <(curl -Ls https://coverage.codacy.com/get.sh -r SlatherReports/cobertura.xml)的退出状态为2而不是0。sh:-c:第0行:接近意外令牌的语法错误
(' sh: -c: line 0:bash <(curl -Ls https://coverage.codacy.com/get.sh -r SlatherReports/cobertura.xml)‘
那我该怎么解决这个问题?谢谢。
发布于 2020-04-07 00:53:54
我自己找到答案了。这是一个非常简单的问题(为什么我之前没有想到这一点?)我只是将整个bash <(curl -Ls https://coverage.codacy.com/get.sh -r SlatherReports/cobertura.xml)行放入一个不同的bash脚本文件中,然后调用它。LOL。
https://stackoverflow.com/questions/61051044
复制相似问题