Skip to content

Commit

Permalink
[watcher] Commit changes on insert code action
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro committed Mar 25, 2012
1 parent f16058a commit 952982b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 952982b

Please sign in to comment.