为什么我在 iTerm2 中运行重新运行 Go 包时得到错误的文件描述符?

我在 iTerm2 终端中使用重新运行的 Go 包并出现错误

读取要收听的文件列表时出错!错误的文件描述符

此错误来自 filepath.Walk 函数。问题是在集成的 VSCode 终端中一切正常,但在 iTerm2 中却不行。我可以保证配置文件是 100% 正确的(重新运行说配置在其他方面不正确,而且我们在一个团队中使用这个配置几年)。另外我想提一下,iTerm2 在 MacOS 隐私设置中具有全盘访问权限。

非常感谢有关我的问题的任何信息或帮助。

我在 macOS Monterey 12.1,M1 Max 上。

完整错误:

rerun -c rerun.json

git/ivp/rer 21:40:28 ☹[PANI] ▶ Error while reading list of files to listen! bad file descriptor

panic: Error while reading list of files to listen! %s


goroutine 1 [running]:

github.com/ivpusic/golog.(*Logger).Panicf(0xc000166100, {0x12024a8, 0x2f}, {0xc00015de98, 0x1e51ff8, 0x18})

    /Users/greenwookez/go/pkg/mod/github.com/ivpusic/golog@v0.0.0-20170608213328-28640bee649f/logger.go:315 +0x134

main.(*watcher).start(0xc0001261e0)

    /Users/greenwookez/go/pkg/mod/github.com/ivpusic/rerun@v0.0.0-20170331080801-adc8acf1481b/watcher.go:147 +0x2ef

main.main()

    /Users/greenwookez/go/pkg/mod/github.com/ivpusic/rerun@v0.0.0-20170331080801-adc8acf1481b/main.go:51 +0x2af


白衣染霜花
浏览 99回答 1
1回答

UYOU

通过默认的 Mac OS 终端重现了相同的问题,因此我决定从头开始重新安装 Mac OS(而不是从具有大量不同配置的旧 Mac 迁移)并添加unlim -n <more than 256>到.zprofile.&nbsp;希望它会帮助某人。
打开App,查看更多内容
随时随地看视频慕课网APP