我有一个 Go 项目(bazel-remote),当使用 Bazel 构建时,它试图读取在命令行中传递的 YAML 文件。此 YAML 文件与我运行命令的位置相同bazel run。
但它无法运行,因为os.Open失败了_no such file or directory_。
我打印了basePathusing os.Getwd,因为有人建议我basePath可能设置错误。但是 mybasePath设置为 my 中/private/var/tmp/创建和存储 Bazel 对象的位置:
/private/var/tmp/_bazel`_`<username>``/312feba8ddcde6737ae7dd7ef9bc2a5a/execroot/__main__/bazel-out/darwin-fastbuild/bin/darwin_amd64_static_pure_stripped/bazel-remote.runfiles/__main`__
如何basePath正确设置我的?为什么我的basePath设置到它所在的位置?
吃鸡游戏
动漫人物
随时随地看视频慕课网APP
相关分类