Skip to content

Commit 930c9f4

Browse files
author
William Blankenship
committed
*Final* patch for -C fix
Should be properly adding the remote directory now.
1 parent 4940af7 commit 930c9f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ exports.maintainRepo = function (dir,url,callback) {
2121

2222
//TODO: Handle errors for git. May not have permission for the specified directory
2323
var child = exec('git init '+dir, function(error, stdout,stderr) {
24-
var child = exec('git -C "'+dir+'" remote add origin '+url,function(error,stdout,stderr) {
24+
var child = exec('git --git-dir="'+dir+'/.git" --work-tree="'+dir+'" remote add origin '+url,function(error,stdout,stderr) {
2525
var child = exec('git --git-dir="'+dir+'/.git" --work-tree="'+dir+'" reset --hard && git --git-dir="'+dir+'/.git" --work-tree="'+dir+'" pull origin master',function(error,stdout,stderr) {
2626
if(!execResult(error,stdout,stderr)) {
2727
console.log('exec error: '+error);

0 commit comments

Comments
 (0)