Permalink
Browse files

fix uninstall command for single file modules

  • Loading branch information...
1 parent 2053e92 commit 78e97fd3fb1a7530d8fa5c88f31f0d4cca4807c5 @Shogun147 committed Dec 9, 2012
Showing with 8 additions and 2 deletions.
  1. +1 −1 bin/katana
  2. +7 −1 bin/modules
View
@@ -9,7 +9,7 @@ var spawn = require('child_process').spawn;
var App = require('commander');
App.version(require(mod_root + 'package').version);
-App.usage('<command> [options]');
+App.usage('katana <command> [options]');
App.on('--help', function() {
console.log(' Commands:'+ eol);
View
@@ -395,7 +395,13 @@ App.command('uninstall <name>')
run_hook('uninstall', module, function(error) {
if (error) { return Err(error); }
- remove(root +'modules/'+ module, function(error) {
+ var path = root +'modules/'+ module;
+
+ if (Fs.existsSync(path +'.js')) {
+ path += '.js';
+ }
+
+ remove(path, function(error) {
if (error) { return Err(error); }
var pack = require(root +'package.json');

0 comments on commit 78e97fd

Please sign in to comment.