| @@ -280,7 +280,9 @@ var __runcmd = function(label){ | |||
| , inherit : true, shell: true | |||
| , env: process.env | |||
| }] | |||
| , ['git', ['remote', 'rename', 'origin', 'githubclone'], { cwd : `${repo}`}] // PB ; Todo -- new repositories created locally will not have origin. Handle this failure. | |||
| , ['git', ['remote', 'rename', 'origin', 'githubclone'], { cwd : `${repo}`}, (err)=>{ | |||
| console.log('Ignoring origin rename error : ' + err); return true; //return true to continue. | |||
| } ] // PB ; Todo -- new repositories created locally will not have origin. Handle this failure. | |||
| , ['git', ['remote', 'add', 'origin', `${defaultRepoServer}/${repo}.git`], { cwd : `${repo}`}] | |||
| ] | |||
| if(!existsSync(`Z:`)){ | |||
| @@ -292,7 +294,7 @@ var __runcmd = function(label){ | |||
| // throw 'done' | |||
| } | |||
| } | |||
| sequentialTaskShellCommands.push(['git', ['push', 'origin', 'master'], { cwd : `${repo}`}]) | |||
| // console.dir(sequentialTaskShellCommands); | |||
| @@ -300,7 +302,8 @@ var __runcmd = function(label){ | |||
| sequentialTaskShellCommands.forEach(shellcmd => { | |||
| // console.log(shellcmd) | |||
| tasks.push(()=>{ | |||
| var p = nodeShellExec.apply(null, shellcmd).catch((e)=>{ console.error(e) }) | |||
| var p = nodeShellExec.apply(null, shellcmd.slice(0,3)).catch((e)=>{ if(shellcmd[3]) { return shellcmd[3]() } else { console.error(e);} }) | |||
| return p; | |||
| }) | |||
| }) | |||