Skip to content

Commit

Permalink
Override path to coauthor file with env var
Browse files Browse the repository at this point in the history
  • Loading branch information
rkotze committed May 6, 2024
1 parent bc1032e commit a4eb0bc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Follows [Semantic Versioning](https://semver.org/).

## git-mob-core 0.9.2

### Fixes

- Global path to `.git-coauthors` can be overwritten by env var `GITMOB_COAUTHORS_PATH`.

## git-mob-core 0.9.1

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/git-mob-core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/git-mob-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-mob-core",
"version": "0.9.1",
"version": "0.9.2",
"description": "Git Mob Core library to manage co-authoring",
"homepage": "https://github.com/rkotze/git-mob/blob/master/packages/git-mob-core/README.md",
"main": "./dist/index.js",
Expand Down
4 changes: 4 additions & 0 deletions packages/git-mob-core/src/git-mob-api/git-authors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export function gitAuthors(
export const gitCoauthorsFileName = '.git-coauthors';

export function globalGitCoAuthorsPath() {
if (process.env.GITMOB_COAUTHORS_PATH) {
return process.env.GITMOB_COAUTHORS_PATH;
}

return path.join(os.homedir(), gitCoauthorsFileName);
}

Expand Down

0 comments on commit a4eb0bc

Please sign in to comment.