get-config
get-config
命令返回 root 目录的 .watchmanconfig
。 如果没有 .watchmanconfig
,则返回一个空的配置字段
$ watchman get-config .
{
"version": "2.9.9",
"config": {}
}
$ watchman get-config /path/to/root
{
"version": "2.9.9",
"config": {
"ignore_dirs": [
"buck-out"
]
}
}
请注意,watchman 仅在建立 watch 时读取 .watchmanconfig
文件。 如果在此之后进行更改,get-config
响应将不会反映这些更改。
有关 config
字段有效内容的详细信息,请参阅配置选项。 请注意,get-config
返回的值直接从 .watchmanconfig
文件传递,因此可能包含不完全合法的字段。
此命令自 watchman 版本 2.9.9 起可用。