Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
refactor: 💡 use join to concatenate paths
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jan 16, 2020
1 parent 2990ffe commit 2519d1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cli.js
@@ -1,5 +1,6 @@
const {spawn} = require('child_process');
const fs = require('fs');
const {join} = require('path');
const shellescape = require('any-shell-escape');
const minimist = require('minimist');
const signale = require('signale');
Expand Down Expand Up @@ -49,7 +50,7 @@ const main = async () => {
* @see https://github.com/streamich/git-cz/issues/79
*/
if (isHook) {
const commitMsgFile = getGitRootDir() + '/.git/COMMIT_EDITMSG';
const commitMsgFile = join(getGitRootDir(), '.git', 'COMMIT_EDITMSG');

fs.writeFileSync(commitMsgFile, message);
// eslint-disable-next-line no-process-exit
Expand Down

0 comments on commit 2519d1c

Please sign in to comment.