Skip to content

Commit

Permalink
chore(gatsby): Get rid of "DeprecationWarning: asynchronous function …
Browse files Browse the repository at this point in the history
…without callback" (gatsbyjs#13209)

* Get rid of DeprecationWarning: Calling an asynchronous function without callback is deprecated

* Move to fs-extra remove for simplicity
  • Loading branch information
sidharthachatterjee authored Apr 8, 2019
1 parent fbd1ec1 commit 34b11e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/gatsby/src/commands/build-html.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow */
const webpack = require(`webpack`)
const fs = require(`fs`)
const fs = require(`fs-extra`)

const webpackConfig = require(`../utils/webpack.config`)
const { createErrorFromString } = require(`gatsby-cli/lib/reporter/errors`)
Expand Down Expand Up @@ -44,8 +44,8 @@ const buildRenderer = async (program, stage) => {

const deleteRenderer = async rendererPath => {
try {
await fs.unlink(rendererPath)
await fs.unlink(`${rendererPath}.map`)
await fs.remove(rendererPath)
await fs.remove(`${rendererPath}.map`)
} catch (e) {
// This function will fail on Windows with no further consequences.
}
Expand Down

0 comments on commit 34b11e4

Please sign in to comment.