Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchman returns 0 on error #42

Closed
jimpurbrick opened this issue Jun 24, 2014 · 1 comment
Closed

watchman returns 0 on error #42

jimpurbrick opened this issue Jun 24, 2014 · 1 comment

Comments

@jimpurbrick
Copy link

I'm not sure if this is a bug or working as intended, but I was surprised that when I ran:

echo '["query", "/some/unwatched/path", {"since": "n:somenewname"}]' | watchman -j

I received a JSON formatted error as the output, but the return code from watchman was 0. I expected errors to return a non-zero exit-status and so was silently ignoring these errors due to the 0 return code.

@wez
Copy link
Contributor

wez commented Jun 24, 2014

That's expected behavior. It's not very clearly indicated in the docs here
https://facebook.github.io/watchman/docs/cli-options.html#input-and-output
we can make this clearer.

jimpurbrick added a commit to facebook/buck that referenced this issue Jun 26, 2014
Summary:
Currently Watchman returns some errors as query results
without returning a non-zero exit status
(facebook/watchman#42). This change surfaces
those errors as HumanReadableExceptions rather than silently
swallowing the errors and treating them as empty file change sets.

Test Plan: buck test --all
wez added a commit that referenced this issue Mar 27, 2015
@wez wez closed this as completed Mar 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants