GithubHelp home page GithubHelp logo

Comments (7)

wez avatar wez commented on April 25, 2024

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.

wez avatar wez commented on April 25, 2024

(we can also disallow watching / while we're in there)

from watchman.

wez avatar wez commented on April 25, 2024
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.

schickling avatar schickling commented on April 25, 2024

👍 for relative paths

from watchman.

rhacker avatar rhacker commented on April 25, 2024

this is not merged ?

from watchman.

wez avatar wez commented on April 25, 2024

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.

rhacker avatar rhacker commented on April 25, 2024

thanks, I have an old version. Everything works fine for now :)

from watchman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.