You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I say watchman watch . from some small subdirectory, watchman hangs, persumably because it interpreted the . to mean a different directory to what I expected and is crawling some giant folder somewhere like / or ~.
It would be nice to have relative paths warn, or just handle them correctly.
The path is resolved by the watchman server which has a working dir set to /, and you're right in that you don't really want to be watching everything.
Handling relative paths in all cases means replicating the server logic in the client, and then it wouldn't behave in quite the same way as clients that are using the JSON or BSER protocols.
I'm leaning towards a simpler sanity check: if the path doesn't start with a / when it reaches the server, we can return an error and ask you pass in the absolute path.
In the meantime, I'd recommend using watchman watch $PWD instead
Activity
wez commentedon Apr 10, 2014
The path is resolved by the watchman server which has a working dir set to
/, and you're right in that you don't really want to be watching everything.Handling relative paths in all cases means replicating the server logic in the client, and then it wouldn't behave in quite the same way as clients that are using the JSON or BSER protocols.
I'm leaning towards a simpler sanity check: if the path doesn't start with a
/when it reaches the server, we can return an error and ask you pass in the absolute path.In the meantime, I'd recommend using
watchman watch $PWDinsteadwez commentedon Apr 10, 2014
(we can also disallow watching
/while we're in there)Sanity check that root is absolute
wez commentedon Apr 20, 2014
I'm calling this "good enough" for now. I have some hacking lined up for the CLI that might address making it smarter, we'll see how far I get.
schickling commentedon Apr 29, 2014
👍 for relative paths
preprocess commands in the CLI
wez commentedon May 13, 2014
b8832cc is in the tree, and I get this when I run what's in master:
so this is done. Are you trying something and it isn't working?