From 0a24d70e49153901a3005ce961bf885d6adaaf45 Mon Sep 17 00:00:00 2001 From: Chris LaRose Date: Thu, 10 Jan 2019 07:29:52 -0800 Subject: [PATCH] Write full path to commit.template config This is done in order to support committing from git submodules. Fixes #33 --- src/git-message/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/git-message/index.js b/src/git-message/index.js index dec1a42..77ef8ee 100644 --- a/src/git-message/index.js +++ b/src/git-message/index.js @@ -1,5 +1,6 @@ const fs = require('fs'); const os = require('os'); +const path = require('path'); const { config, revParse } = require('../git-commands'); @@ -75,7 +76,7 @@ function commitTemplatePath() { return ( process.env.GITMOB_MESSAGE_PATH || config.get('commit.template') || - '.git/.gitmessage' + path.resolve(gitMessagePath()) ); }