# find-git-exec

> A lightweight library for locating the Git executable on the host system

Latest version **0.0.4** (published 2021-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install find-git-exec
pnpm add find-git-exec
yarn add find-git-exec
bun add find-git-exec
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2021-08-20 |
| First published | 2017-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.11.0 |
| Dependencies | 3 |
| Unpacked size | 31.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | typefox |
| Maintainers | typefox-team |
| Keywords | git |

## Links

- npm: https://www.npmjs.com/package/find-git-exec
- Repository: https://github.com/TypeFox/find-git-exec
- Issues: https://github.com/TypeFox/find-git-exec/issues
- npm.io page: https://npm.io/package/find-git-exec

## Dependencies (3)

- [which](https://npm.io/package/which.md) ^2.0.1
- [@types/node](https://npm.io/package/@types/node.md) ^10.14.22
- [@types/which](https://npm.io/package/@types/which.md) ^1.3.2

## Recent versions

- 0.0.4 (latest) — 2021-08-20
- 0.0.3 — 2020-06-04
- 0.0.2 — 2019-11-20
- 0.0.1-alpha.2 — 2017-09-04
- 0.0.1-alpha.1 — 2017-09-04

## README

# find-git-exec
[![Build Status](https://github.com/TypeFox/find-git-exec/actions/workflows/actions.yml)](https://github.com/TypeFox/find-git-exec/actions/workflows/actions.yml)

A lightweight library for locating the Git executable on the host system.
This library is a stripped down version of the Git discovery logic [implemented and used by VS Code](https://github.com/microsoft/vscode/blob/master/extensions/git/src/git.ts#L50-L141).

## Install
```bash
# with npm
npm i find-git-exec
# with yarn
yarn add find-git-exec
```

## Build
```bash
yarn build
```

## Test
```bash
yarn test
```

## Example
```javascript
import findGit from 'find-git-exec';

try {
    const { version, path } = await findGit();
    console.log(`Git version: ${version}`);
    console.log(`Git path: ${path}`);
} catch (error) {
    console.error(error);
}
```

## License
Copyright (c) - TypeFox.
Licensed under the [MIT](LICENSE) license.

---
_Source: https://npm.io/package/find-git-exec · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
