opensafely-core / opensafely-core/opensafely-cli
Add preflight check for the presence of `git`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 5
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 4
Description
We shell out to git in multiple places, so we should check that it's accessible beforehand so we can error out with a helpful message (as we currently do for docker).
This is particularly important because although Github Desktop bundles the git binary, it doesn't put it on the path so installing Github Desktop is insufficient here. We could try to spot the Github Desktop is installed and get the path to git ourselves but I think that's probably a bad idea. Better to make it clear in the error message that installing Github Desktop is insufficient and link to the download page for vanilla git:
https://git-scm.com/downloads
Bonus points for detecting the operating system and linking to the correct sub-page.
Associated Slack thread where this issue first came up:
https://ebmdatalab.slack.com/archives/C010SJ89SA3/p1638537319387800
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 by locating the existing Docker preflight check and the places where the CLI shells out to git. Add an early, helpful error when git is unavailable, including the vanilla Git download link and, if feasible, an operating-system-specific link; done means git failures are detected before those operations run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100