Skip to content

Commit

Permalink
[refactor] Do not use common.rimraf
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Jul 10, 2013
1 parent 02e55db commit d181142
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions lib/quill/common/index.js
Expand Up @@ -9,6 +9,7 @@ var fs = require('fs'),
path = require('path'),
flatiron = require('flatiron'),
multimeter = require('multimeter-stack'),
rimraf = require('rimraf'),
quill = require('../../quill');

var common = module.exports = flatiron.common.mixin({}, flatiron.common);
Expand All @@ -25,7 +26,7 @@ common.authorizedKeys = require('./authorized-keys');
common.remkdirp = function (dir, callback) {
common.async.series([
function tryRimraf(next) {
common.rimraf(dir, function (err) {
rimraf(dir, function (err) {
return err && err.code !== 'ENOENT'
? next(err)
: next();
Expand Down Expand Up @@ -134,4 +135,4 @@ common.ignore = {
'.*.sw[a-z]',
'*.un~'
]
};
};
3 changes: 2 additions & 1 deletion lib/quill/composer/cache.js
Expand Up @@ -10,6 +10,7 @@ var fs = require('fs'),
composer = require('./index'),
quill = require('../../quill'),
common = quill.common,
rimraf = require('rimraf'),
async = common.async;

//
Expand Down Expand Up @@ -147,7 +148,7 @@ exports.addOne = function (system, callback) {
function rename(next) {
fs.rename(target, system.cached, next)
},
async.apply(common.rimraf, untar)
async.apply(rimraf, untar)
], function (err) {
//
// 8. Invoke the callback
Expand Down
5 changes: 3 additions & 2 deletions lib/quill/composer/installed.js
Expand Up @@ -9,6 +9,7 @@ var fs = require('fs'),
path = require('path'),
fstream = require('fstream'),
semver = require('semver'),
rimraf = require('rimraf'),
composer = require('./index'),
quill = require('../../quill'),
common = quill.common,
Expand Down Expand Up @@ -184,7 +185,7 @@ exports.remove = function (systems, callback) {
// TODO: Check to see if there is more than one version installed.
// TODO: Update versions
//
async.forEach(dirs, common.rimraf, next);
async.forEach(dirs, rimraf, next);
});
});
}
Expand Down Expand Up @@ -436,4 +437,4 @@ exports.ensureLatestDependencies = function (system, callback) {
: next();
}
], callback);
};
};
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -31,7 +31,8 @@
"semver": "1.1.4",
"system.json": "~1.2.2",
"union": "0.3.6",
"wtfos": "0.0.3"
"wtfos": "0.0.3",
"rimraf": "2.2.x"
},
"devDependencies": {
"nock": "0.16.x",
Expand Down

0 comments on commit d181142

Please sign in to comment.