浏览代码

Merge branch 'master' of //172.16.0.27/repos/elxr

production
JArun2018 4 年前
父节点
当前提交
8e7fc70024
共有 1 个文件被更改,包括 14 次插入7 次删除
  1. 14
    7
      index.js

+ 14
- 7
index.js 查看文件

@@ -304,10 +304,16 @@ var __runcmd = function(label){
}
).then(()=>{
// runas returned.
var runaslog = JSON.parse('[ { "success" : true, "result" : "runas Log" }' + fs.readFileSync('run.log', { flags : 'a+'}) + ']');
runaslog.forEach((logEntry)=>{
logEntry.success ? (console.log(['success :' + logEntry.result]), console.log((logEntry.messages || []).join(' '))) : console.error(['error :' + logEntry.result]), console.error((logEntry.messages || []).join(' '))
})
try {
var runaslog = JSON.parse('[ { "success" : true, "result" : "runas Log" }' + fs.readFileSync('run.log', { flags : 'a+'}) + ']');
runaslog.forEach((logEntry)=>{
logEntry.success ? (console.log(['success :' + logEntry.result]), console.log((logEntry.messages || []).join(' '))) : (console.error(['error :' + logEntry.result]), console.error((logEntry.messages || []).join(' ')))
})
}
catch(e){
// Ignore nonexistent log
console.warn('Run log error probably was not created by runas : ' + e)
}
})
.catch(err => console.error('Elevation failed : ' + err));
})
@@ -591,8 +597,9 @@ var __runcmd = function(label){
var performCheckout = (repo)=>{
if(excludeCheckouts[repo]) return Promise.resolve({ 'skipped' : true })
return nodeShellExec('git', ['switch', '-m', '-C', checkoutMap[runconfig.NODE_ENV] || runconfig.NODE_ENV], {
inherit : true, shell: true,
// inherit : true, shell: true,
cwd : repo
// , stdio : ignore // Use when we want to silcence output completely.
, runas : processedArgs.runas
, title : `git switch -C -m ${checkoutMap[runconfig.NODE_ENV] || runconfig.NODE_ENV} for ${repo}`
}).catch((e)=>{ console.error(e); return { error : true, message : repo} })
@@ -601,10 +608,10 @@ var __runcmd = function(label){
var performPullAll = (repo)=>{
if(excludeCheckouts[repo]) return Promise.resolve({ 'skipped' : true })
return nodeShellExec('git', ['pull', '--all'], {
inherit : true, shell: true,
// inherit : true, shell: true,
cwd : repo
, runas : processedArgs.runas
, title : `git switch -C -m ${checkoutMap[runconfig.NODE_ENV] || runconfig.NODE_ENV} for ${repo}`
, title : `git pull -all for ${checkoutMap[runconfig.NODE_ENV] || runconfig.NODE_ENV} ${repo}`
}).catch((e)=>{ console.error(e); return { error : true, message : repo} })
}


正在加载...
取消
保存