Skip to content

Commit

Permalink
fix(gatsby-plugin-feed): Exists function and update version fs-extra (#…
Browse files Browse the repository at this point in the history
…29616) (#29764)

Co-authored-by: Hector Alcazar <halcaza@US-C02DKA1XMD6M>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit 5fb6064)

Co-authored-by: hiad <hiad99@gmail.com>
  • Loading branch information
ascorbic and hiad committed Feb 25, 2021
1 parent 997985a commit 21f02de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-feed/package.json
Expand Up @@ -10,7 +10,7 @@
"@babel/runtime": "^7.12.5",
"@hapi/joi": "^15.1.1",
"common-tags": "^1.8.0",
"fs-extra": "^8.1.0",
"fs-extra": "^9.1.0",
"gatsby-plugin-utils": "^0.9.0",
"lodash.merge": "^4.6.2",
"rss": "^1.2.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-feed/src/gatsby-node.js
Expand Up @@ -59,7 +59,7 @@ exports.onPostBuild = async ({ graphql }, pluginOptions) => {

const outputPath = path.join(publicPath, feed.output)
const outputDir = path.dirname(outputPath)
if (!(await fs.exists(outputDir))) {
if (!(await fs.pathExists(outputDir))) {
await fs.mkdirp(outputDir)
}
await fs.writeFile(outputPath, rssFeed.xml())
Expand Down

0 comments on commit 21f02de

Please sign in to comment.