aws / chalice

Python Serverless Microframework for AWS
Apache License 2.0
10.67k stars 1.01k forks source link

Relative path to chalice local command #1295

Open rajpdus opened 5 years ago

rajpdus commented 5 years ago
    rv = self.invoke(ctx)
  File "/Users/.virtualenvs/venv/lib/python3.7/site-packages/click/core.py", line 1134, in invoke
    Command.invoke(self, ctx)
  File "/Users/.virtualenvs/venv/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/.virtualenvs/venv/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/.virtualenvs/venv/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/.virtualenvs/venv/lib/python3.7/site-packages/chalice/cli/__init__.py", line 114, in cli
    os.chdir(project_dir)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/Workspace/Projects/lambdas/lambdas'

(venv) [user@cmp ~/Workspace/Projects ]$ chalice --project-dir ./lambdas/ local

app.py is in a directory named lambdas. Why does it show two lambdas at the end of error? It however works fine with complete file path.

stealthycoin commented 5 years ago

Thanks for the report. Looks like a bug to me.