Skip to content

Commit

Permalink
Fix fs.rename after Node.js v10.0.0
Browse files Browse the repository at this point in the history
Add callback parameter for fs.rename() to build after Node.js v10.0.0.
Signed-Off-By: Yue Yang <metab0t@outlook.com>
  • Loading branch information
metab0t committed May 19, 2018
1 parent da3afd6 commit ebcf600
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/build_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ function copyFile(file, target) {
function renameAsync(from, to) {
console.log(from, '----->', to)
// @ts-ignore
fs.rename(from, to)
fs.rename(from, to, (err) => {
if (err) throw err;
})
// fs.renameSync(from,to)

}
Expand Down

0 comments on commit ebcf600

Please sign in to comment.