Permalink
Browse files

minor fix for binary, ignore hooks if module is on file

  • Loading branch information...
1 parent 172dd11 commit 727f20f186f076dab94487915fe21d96ff036ca9 @Grigore147 committed Oct 19, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 bin/katana
View
@@ -323,6 +323,7 @@ App.command('modules-install <name> [url]')
if (error || !items.length) { return Err('Error: '+ (error ? '\n'+error : 'module extracting failed!')); }
var tmp = items[0];
+ var is_file = false;
Fs.readdir(root +'temp/modules/'+ name +'/'+ tmp, function(error, items) {
var pending = items.length;
@@ -332,6 +333,8 @@ App.command('modules-install <name> [url]')
if (pending === 1) {
var item = items[0];
+ is_file = true;
+
copy(root +'temp/modules/'+ name +'/'+ tmp +'/'+ item, root +'modules/'+ item, function(error) {
callback(error);
});
@@ -356,6 +359,8 @@ App.command('modules-install <name> [url]')
}
},
function(callback) {
+ if (is_file) { return callback(); }
+
Fs.readdir(root +'modules/'+ name +'/hooks', function(error, hooks) {
if (error) { return callback(); }

0 comments on commit 727f20f

Please sign in to comment.