diff --git a/lib/util/move-file.js b/lib/util/move-file.js index e12e981..422c829 100644 --- a/lib/util/move-file.js +++ b/lib/util/move-file.js @@ -2,8 +2,6 @@ const fs = require('graceful-fs') const BB = require('bluebird') -const chmod = BB.promisify(fs.chmod) -const unlink = BB.promisify(fs.unlink) let move let pinflight @@ -29,11 +27,8 @@ function moveFile (src, dest) { return cb(err) } } - return cb() + return fs.unlink(src, cb) }) - }).then(() => { - // content should never change for any reason, so make it read-only - return BB.join(unlink(src), process.platform !== 'win32' && chmod(dest, '0444')) }).catch(err => { if (process.platform !== 'win32') { throw err