mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-09 13:36:29 +00:00
fix: default commitConvention to 'none' (#179)
This commit is contained in:
parent
2376ada660
commit
e639593c5d
1 changed files with 8 additions and 1 deletions
|
@ -8,10 +8,17 @@ function readConfig(configPath) {
|
|||
if (!('repoType' in config)) {
|
||||
config.repoType = 'github'
|
||||
}
|
||||
if (!('commitConvention' in config)) {
|
||||
config.commitConvention = 'none'
|
||||
}
|
||||
return config
|
||||
} catch (error) {
|
||||
if (error instanceof SyntaxError) {
|
||||
throw new SyntaxError(`Configuration file has malformed JSON: ${configPath}. Error:: ${error.message}`)
|
||||
throw new SyntaxError(
|
||||
`Configuration file has malformed JSON: ${configPath}. Error:: ${
|
||||
error.message
|
||||
}`,
|
||||
)
|
||||
}
|
||||
if (error.code === 'ENOENT') {
|
||||
throw new Error(`Configuration file not found: ${configPath}`)
|
||||
|
|
Loading…
Reference in a new issue