From 7fb47b142c215195e1109c0a5cdadc7093f6ddb5 Mon Sep 17 00:00:00 2001 From: Manuel Cabral Date: Thu, 30 Oct 2014 10:38:01 +0000 Subject: [PATCH] Remove rename (causing EPERM error on Windows) --- bin/cmd.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/bin/cmd.js b/bin/cmd.js index bd0a1b1..5d1d5ef 100755 --- a/bin/cmd.js +++ b/bin/cmd.js @@ -28,20 +28,17 @@ function bundle () { if (err) console.error(err); }) }); - wb.pipe(fs.createWriteStream(dotfile)); + wb.pipe(fs.createWriteStream(outfile)); var bytes, time; w.on('bytes', function (b) { bytes = b }); w.on('time', function (t) { time = t }); wb.on('end', function () { - fs.rename(dotfile, outfile, function (err) { - if (err) return console.error(err); - if (verbose) { - console.error(bytes + ' bytes written to ' + outfile - + ' (' + (time / 1000).toFixed(2) + ' seconds)' - ); - } - }); + if (verbose) { + console.error(bytes + ' bytes written to ' + outfile + + ' (' + (time / 1000).toFixed(2) + ' seconds)' + ); + } }); }