Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"sinon": "^1.17.3"
},
"dependencies": {
"application-config-path": "^0.1.0",
"chalk": "1.1.3",
"cz-conventional-changelog": "1.1.6",
"dedent": "0.6.0",
Expand All @@ -74,7 +75,6 @@
"glob": "7.0.3",
"gulp": "3.9.1",
"gulp-git": "1.7.2",
"home-or-tmp": "2.0.0",
"inquirer": "1.0.3",
"lodash": "4.11.1",
"minimist": "1.2.0",
Expand Down
6 changes: 3 additions & 3 deletions src/commitizen/commit.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'path';
import homeOrTmp from 'home-or-tmp';
import ConfigDir from 'application-config-path';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the convention is that initial uppercase letter is for classes, can you change this name to configDir instead? thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly, hang on :)

import dedent from 'dedent';
import {commit as gitCommit, log} from '../git';
import * as cache from './cache';
Expand All @@ -23,7 +23,7 @@ function dispatchGitCommit(sh, repoPath, template, options, overrideOptions, don
*/
function commit(sh, inquirer, repoPath, prompter, options, done) {

var cachePath = path.join(homeOrTmp, 'commitizen.json');
var cachePath = path.join(ConfigDir('commitizen'), 'commitizen.json');

if(options.retryLastCommit) {

Expand All @@ -48,4 +48,4 @@ function commit(sh, inquirer, repoPath, prompter, options, done) {
});
}

}
}