Skip to content

Commit c815e4b

Browse files
authored
Merge pull request #127 from rkotze/fix-nopath-template
Fix no path to template
2 parents 1dc543a + 464f8c9 commit c815e4b

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ Follows [Semantic Versioning](https://semver.org/).
44

55
## git-mob-core Next
66

7+
## git-mob-core 0.9.3
8+
9+
### Added
10+
711
- Migrate git template `git-messages` function to TypeScript.
812

13+
### Fixes
14+
15+
- When no path set for the commit template, default to the global template. Don't use a relative path.
16+
917
## git-mob-core 0.9.2
1018

1119
### Fixes

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/git-mob-core/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/git-mob-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "git-mob-core",
3-
"version": "0.9.2",
3+
"version": "0.9.3",
44
"description": "Git Mob Core library to manage co-authoring",
55
"homepage": "https://github.com/rkotze/git-mob/blob/master/packages/git-mob-core/README.md",
66
"main": "./dist/index.js",

packages/git-mob-core/src/git-mob-api/resolve-git-message-path.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { resolve, relative, join } from 'node:path';
1+
import { resolve, join } from 'node:path';
22
import { homedir } from 'node:os';
33
import { topLevelDirectory } from './git-rev-parse.js';
44
import { getConfig, setConfig } from './exec-command.js';
@@ -17,11 +17,11 @@ async function resolveGitMessagePath(templatePath?: string) {
1717

1818
if (templatePath) return resolve(await topLevelDirectory(), templatePath);
1919

20-
return relative(await topLevelDirectory(), gitMessagePath());
20+
return resolve(gitMessagePath());
2121
}
2222

2323
function gitMessagePath() {
24-
return process.env.GITMOB_MESSAGE_PATH || join(homedir(), '.gitmessage');
24+
return join(homedir(), '.gitmessage');
2525
}
2626

2727
export { resolveGitMessagePath, setCommitTemplate };

0 commit comments

Comments
 (0)