Skip to content

Commit 057719c

Browse files
committed
fix(validator): fix config file path
1 parent 8549efe commit 057719c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/validator/validator.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ export namespace validator {
1010
const DEFAULT_CONFIG_FILENAME = "speedy-commit-msg.json";
1111

1212
export async function validate(commitMessage?: string, configFilePath?: string) {
13-
const configPath = config.getConfigFilePath(configFilePath || DEFAULT_CONFIG_FILENAME, join("../../config", DEFAULT_CONFIG_FILENAME));
13+
const configPath = config.getConfigFilePath(
14+
configFilePath || DEFAULT_CONFIG_FILENAME,
15+
join(__dirname, "../../config", DEFAULT_CONFIG_FILENAME)
16+
);
1417
const configData = await config.readConfigFile<ConfigData>(configPath);
1518
const { type, message, scope, subject } = configData.rules;
1619

0 commit comments

Comments
 (0)