summaryrefslogtreecommitdiff
path: root/scripts/winpy3fix.js
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2014-04-08 22:05:07 +0100
committerprzemyslawpluta <przemekpluta@hotmail.com>2014-04-08 22:05:07 +0100
commit502aa01ab9082a4ccb5ef747c561ddb77a2cd6e4 (patch)
tree1aff952337d631a9181a14effe527feae56864c4 /scripts/winpy3fix.js
parent1ddd2de23d9ae93511da942c2dc568ffba7fa8a1 (diff)
downloadmongo-edu-502aa01ab9082a4ccb5ef747c561ddb77a2cd6e4.zip
typo
Diffstat (limited to 'scripts/winpy3fix.js')
-rw-r--r--scripts/winpy3fix.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/winpy3fix.js b/scripts/winpy3fix.js
index 345013e..d5facd0 100644
--- a/scripts/winpy3fix.js
+++ b/scripts/winpy3fix.js
@@ -1,7 +1,15 @@
var mv = require('mv'),
+ fs = require('fs'),
path = require('path');
-mv(path.resolve(__dirname + '../' + '../.temp/youtube-dl.js'), path.resolve(__dirname + '../' + '../node_modules/youtube-dl/lib/youtube-dl.js'), function error(err) {
- 'use strict';
- if (err !== null) { console.log(err); }
+var target = path.resolve(__dirname + '../' + '../node_modules/youtube-dl/lib/youtube-dl.js');
+
+fs.unlink(target, function (err) {
+ 'use strict';
+ if (err !== null) { return console.log(err.stack); }
+ mv(path.resolve(__dirname + '../' + '../.temp/youtube-dl.js'), target, function error(err) {
+ if (err !== null) { console.log(err); }
+ });
});
+
+