opensafely-core / opensafely-core/opensafely-cli
Running `opensafely launch` should handle not being in the right directory better
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 5
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 4
Description
A user ran opensafely launch in their windows home directory.
This didn't work, as it tried to mount some stuff it didn't have permissions for, and gave a confusing error message.
For some commands, you need to be in an opensafely project directory to work. e.g. opensafely run. The opensafely run code checks for this explicitly, and errors.
But the same is also true for other opensafely commands, probably: launch, clean, codelists.
We should detect if we are in an opensafely project dir by looking for a project.yaml, and error with a more helpful error message in these cases. This should avoid further user confusion.
Came in via tech support in this Slack thread.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the existing opensafely run project-directory check and compare the command entry points for launch, clean, and codelists. Done means commands that require a project.yaml stop early outside a project directory with a helpful error instead of attempting mounts.
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
- Mostly clear
- Newbie friendliness
- 55/100