Sfoglia il codice sorgente

continue on error

pull/1/head
Pradeep Bhaskaran 4 anni fa
parent
commit
f392b54f14
1 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 6
    3
      index.js

+ 6
- 3
index.js Vedi File

@@ -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;
})
})

Loading…
Annulla
Salva