Permalink
Browse files

[watcher] Commit changes on insert code action

  • Loading branch information...
1 parent f16058a commit 952982bfeecf6e3971927bcad219a23307fcebbf @alejandro alejandro committed Mar 25, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/lib.js
View
@@ -371,7 +371,10 @@ var insert_code = function(location,file,code, cb){
newfile = code+'\n\n'+old
var inserted = fs.createWriteStream(target, {'flags': 'w'},'utf8');
inserted.end(newfile);
- return true
+ exec('cd '+location+'; sudo git add .;sudo git commit -am "[nodester] Watcher code inserted"',function(e,d){
+ if (e) console.log(e);
+ })
+ return fs.truncate(fd, len, callback);
}catch (e){
console.log(e);
return false;

0 comments on commit 952982b

Please sign in to comment.