如何将Watchman触发器的输出定向到OS X上的终端而不是Watchman日志文件

sha*_*ery 6 macos command-line watchman

我正在使用以下行来查看目录并针对更改运行脚本:

watchman -- trigger my_directory runTransitionChecker '*' -- ruby ./my_script.rb
Run Code Online (Sandbox Code Playgroud)

一切正常,除了的所有输出ruby ./my_script均定向到我的计算机上

/usr/local/Cellar/watchman390/3.9.0/var/run/watchman/blahblah-state/log 文件。

从文档和--help看来,也许我应该使用-f标志,但这似乎没有实现。

Wez*_*ong 1

我建议您这样做以获得更新版本的守望者:

brew update
brew install watchman
Run Code Online (Sandbox Code Playgroud)

然后你可以使用https://facebook.github.io/watchman/docs/watchman-make

  • 我使用的脚本是`watchman-make -p 'app/**' 'config/**' --run "rails test"`。(除了 app 和 config 之外,还有一些文件夹。) (2认同)