From 955960683e1ce4c3d3bb9bb993e149103084c0dd Mon Sep 17 00:00:00 2001 From: Sindre Svendby <1047421+SindreSvendby@users.noreply.github.com> Date: Mon, 20 Nov 2023 19:23:09 +0100 Subject: [PATCH] Change README to reflect that env var overrides git, not just a fallback (#128) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 60c08ea..b7012b2 100644 --- a/README.md +++ b/README.md @@ -37,15 +37,15 @@ commitInfo(folder) Notes: -- Code assumes there is `.git` folder and uses Git commands to get each property, like `git show -s --pretty=%B`, see [src/git-api.js](src/git-api.js). Note: there is fallback to environment variables. +- Code assumes there is `.git` folder and uses Git commands to get each property, like `git show -s --pretty=%B`, see [src/git-api.js](src/git-api.js). Note: this can be overrided by environment variables. - Resolves with [Bluebird](https://github.com/petkaantonov/bluebird) promise. - Only uses Git commands, see [src/git-api.js](src/git-api.js) - If a command fails, returns `null` for each property - If you need to debug, run with `DEBUG=commit-info` environment variable. -## Fallback environment variables +## Override with environment variables -If getting the commit information using `git` fails for some reason, you can provide the commit information by setting the environment variables. This module will look at the following environment variables as a fallback +If getting the commit information using `git` fails for some reason, or you want to override them, you can provide the commit information by setting the environment variables. This module will look at the following environment variables as a fallback ``` branch: COMMIT_INFO_BRANCH