Skip to content

Commit ebcf600

Browse files
authored
Fix fs.rename after Node.js v10.0.0
Add callback parameter for fs.rename() to build after Node.js v10.0.0. Signed-Off-By: Yue Yang <metab0t@outlook.com>
1 parent da3afd6 commit ebcf600

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/build_util.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ function copyFile(file, target) {
3232
function renameAsync(from, to) {
3333
console.log(from, '----->', to)
3434
// @ts-ignore
35-
fs.rename(from, to)
35+
fs.rename(from, to, (err) => {
36+
if (err) throw err;
37+
})
3638
// fs.renameSync(from,to)
3739

3840
}

0 commit comments

Comments
 (0)