mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-09 13:36:29 +00:00
fix: d4dc4e2-introduced error (#100)
* adds helpful error message when files is overridden or empty
* fix: d4dc4e2-introduced error
The prior commit to this branch d4dc4e2
introduced an error
in the util/config.js file where it checks for the length of
the content.files property, whether that property exists in
the config or not.
This commit is contained in:
parent
3f2ae00cbc
commit
54febd3c45
1 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,8 @@ function writeConfig(configPath, content) {
|
|||
if (!content.projectName) {
|
||||
throw new Error(`Error! Project name is not set in ${configPath}`)
|
||||
}
|
||||
if (!content.files.length) {
|
||||
|
||||
if (content.files && !content.files.length) {
|
||||
throw new Error(
|
||||
`Error! Project files was overridden and is empty in ${configPath}`,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue