Skip to content

Commit

Permalink
fix(gatsby-source-wordpress): Force removal of types (#37424)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyhopp committed Jan 9, 2023
1 parent 24c393e commit 447a558
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,10 @@ export const writeQueriesToDisk = async ({ reporter }, pluginOptions) => {
const wordPressGraphQLDirectory = `${process.cwd()}/WordPress/GraphQL`

// remove before writing in case there are old types
try {
fs.rmSync(wordPressGraphQLDirectory, {
recursive: true,
})
} catch (e) {
if (!e.message.includes(`no such file or directory, stat`)) {
throw e
}
}
fs.rmSync(wordPressGraphQLDirectory, {
recursive: true,
force: true,
})

for (const {
nodeListQueries,
Expand Down

0 comments on commit 447a558

Please sign in to comment.