Comments (7)
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
from watchman.
(we can also disallow watching /
while we're in there)
from watchman.
wez@wez-mbp master ~/fb/watchman-pure
9:54 $ ./watchman watch .
{
"version": "2.9.6",
"error": "unable to resolve root .: path \".\" must be absolute"
}
wez@wez-mbp master ~/fb/watchman-pure
9:54 $ ./watchman watch $PWD
{
"version": "2.9.6",
"watch": "/Users/wez/fb/watchman-pure"
}
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.
from watchman.
👍 for relative paths
from watchman.
this is not merged ?
from watchman.
b8832cc is in the tree, and I get this when I run what's in master:
$ ./watchman watch .
{
"version": "2.9.8",
"watch": "/Users/wez/fb/watchman"
}
so this is done. Are you trying something and it isn't working?
from watchman.
thanks, I have an old version. Everything works fine for now :)
from watchman.
Related Issues (20)
- watchman on riscv
- why watchman does not support query base on time frame and sorting ability?
- Impossible to install on Amazonlinux HOT 2
- Folly related build issue for ARM Ubuntu 18.04.5 LTS
- Missing RPMs in Release v2023.04.24.00
- WatchMan Error on Docker. Watchman-make is not accessible even after installation.
- "Settle" behavior blocks entire file tree during long running zip operation
- Unable to compile with fmt 10.0.0
- Unable to talk to your watchman on /opt/homebrew/var/run/watchman/[user]-state/sock! HOT 8
- serde_bser: Apache-2.0 license file missing from git repo and published crates
- No Mac OS X binary
- Watchman ignores platform-specific path separators in `dirname` expressions
- Watchman root is set to /Users/<username> despite being run from a different directory HOT 1
- Ubuntu packags missing since May HOT 3
- "I don't know how to install any packages on this system linux-mint-21.2"
- Watchman warns on custom_config example line
- Installation guide HOT 2
- Question - `hint_num_files_per_dir` recursive or not?
- Watchman service is timing out waiting for a synchronization cookie file to be observed by the watcher within 20000 milliseconds HOT 3
- Deploy on winget
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watchman.