瀏覽代碼

Patch linux elevated batch mode

master
guest 2 年之前
父節點
當前提交
9d27f5820e
共有 3 個文件被更改,包括 7 次插入2 次删除
  1. 1
    1
      index.js
  2. 5
    0
      lin_verse.js
  3. 1
    1
      win_verse.js

+ 1
- 1
index.js 查看文件

@@ -2373,7 +2373,7 @@ var elxr = {
// shell_verse.getElevatedTask( t1 )
var eBatch = []
def.elevated.map((def) => getPullTask(def, null, null, null, eBatch))
return shell_verse.runElevated(eBatch).then(() => {
return any(shell_verse.runElevatedBatch(eBatch)).then(() => {
return true;
}).catch((e) => {
console.error(e)

+ 5
- 0
lin_verse.js 查看文件

@@ -84,6 +84,11 @@ var shell_verse = {
return shell_verse.requestElevation(shell_verse.elevatedRunner, taskToRun)
}
}
, runElevatedBatch( batchToRun ){
// In windows we don't need to run each task. We hand over to another shell which in elevated state rebuilds the whole batch and runs.
// Irrespective of the batch we just call runElevated once.
return batchToRun.map( t => runElevated )
}

, getNonElevatedTask : function( taskToRun ){ return ()=>{ return shell_verse.runNonElevated(taskToRun) } }
, runNonElevated : ( taskToRun ) => {

+ 1
- 1
win_verse.js 查看文件

@@ -60,7 +60,7 @@ var shell_verse = {
, runElevatedBatch( batchToRun ){
// In windows we don't need to run each task. We hand over to another shell which in elevated state rebuilds the whole batch and runs.
// Irrespective of the batch we just call runElevated once.
return runElevated(batchToRun[0])
return [runElevated(batchToRun[0])]
}

, getNonElevatedTask : function( taskToRun ){ return ()=>{ return shell_verse.runNonElevated(taskToRun) } }

Loading…
取消
儲存