Skip to content

Commit

Permalink
chore(gatsby-source-contentful): fix locale debug output, again (#28582)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdz authored Dec 11, 2020
1 parent e157f29 commit 6a79ffc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/gatsby-source-contentful/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,17 @@ exports.sourceNodes = async (
const allLocales = locales
locales = locales.filter(pluginConfig.get(`localeFilter`))
reporter.verbose(
`All locales: ${allLocales}, default: ${defaultLocale}, after plugin.options.localeFilter: ${locales}`
`Default locale: ${defaultLocale}. All locales: ${allLocales
.map(({ code }) => code)
.join(`, `)}`
)
if (allLocales.length !== locales.length) {
reporter.verbose(
`After plugin.options.localeFilter: ${locales
.map(({ code }) => code)
.join(`, `)}`
)
}
if (locales.length === 0) {
reporter.panic({
id: CODES.LocalesMissing,
Expand Down

0 comments on commit 6a79ffc

Please sign in to comment.