Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
fix uninstall error
Browse files Browse the repository at this point in the history
  • Loading branch information
nanjingboy committed Oct 8, 2018
1 parent 7bef55f commit fbf10b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/uninstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ var fs = require('fs'),

module.exports = function(version) {
var nodeDir = common.getNodeDir(version);
version = common.replaceVersion(version);
if (fs.existsSync(path.join(nodeDir, 'node.exe')) === false) {
console.log('%s version is not installed yet', version);
process.exit(1);
}

if (process.env.NVMW === version) {
console.log('Cannot uninstall currently-active Node version %s', version);
process.exit(1);
}

rmdir(nodeDir, function(err, dirs, files) {
console.log(
'Node %s removed %s',version, (err ? 'failed' : 'successfully')
'Node %s removed %s', version, (err ? 'failed' : 'successfully')
);
});
};

0 comments on commit fbf10b8

Please sign in to comment.