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

typo in --reload-dir is passed silently (watchgod) #969

Closed
guettli opened this issue Mar 1, 2021 · 2 comments · Fixed by #1089
Closed

typo in --reload-dir is passed silently (watchgod) #969

guettli opened this issue Mar 1, 2021 · 2 comments · Fixed by #1089

Comments

@guettli
Copy link

guettli commented Mar 1, 2021

Checklist

Describe the bug

if I supply a directory to --reload-dir which does not exist, the server starts.

./bin/uvicorn --host localhost --port 8000 --reload  --reload-dir asdfasfsrc foo.asgi:application
INFO:     Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [123571] using watchgod
INFO:     Started server process [123573]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
./bin/uvicorn  --version
Running uvicorn 0.13.4 with CPython 3.8.5 on Linux

Expected behavior

I want the server to not start, if the reload-dir does not exist.

Actual behavior

The server starts.

@euri10
Copy link
Member

euri10 commented Mar 2, 2021

Why is it an issue for you ? iirc we don't add that unexisting directory to watched ones so there's no perf penalty or stuff that is looked at unnecessarily.

@max-l
Copy link

max-l commented Mar 5, 2021

@euri10 not starting with an error message gives a better user (developer) experience !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants