瀏覽代碼

continue on error

pull/1/head
Pradeep Bhaskaran 4 年之前
父節點
當前提交
f392b54f14
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6
    3
      index.js

+ 6
- 3
index.js 查看文件

@@ -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…
取消
儲存