--project-dir flag with relative value appending value twice
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
Running `pwd` I see `~/projects/french-vocab`. I want to run chalice in `~/projects/french-vocab/api/src`
When running `chalice --project-dir="./api/src" local` or `chalice --project-dir="api/src" local` I get this error message `FileNotFoundError: [Errno 2] No such file or directory: '~/projects/french-vocab/api/src/api/src'`
For all relative values I try I have the same issue where the value I give is repeated twice in the error message output, saying file not found.
The workaround I found is to run `chalice --project-dir="$(pwd)/api/src" local` and use the absolute path. Which works great, but this is an awesome project and figured this is a great chance to contribute an issue!
I'm running this on arch, with the version output as follows. `chalice 1.27.0, python 3.10.7, linux 5.15.69-1-lts`
Contributor guide
Research direction
Start at the chalice --project-dir option handling and reproduce the issue with `chalice --project-dir="api/src" local` from the reported project directory. Trace how the relative value is resolved and verify that the command locates `api/src` once, matching the existing absolute-path behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100