|  |  | @@ -1,4 +1,4 @@ | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | var repolog = require('./repolog') | 
		
	
		
			
			|  |  |  | // 'use strict'; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | // PB : TODO -- make sure folder context is proper coz we can now run elxr from anywhere. | 
		
	
	
		
			
			|  |  | @@ -766,12 +766,10 @@ var __runcmd = function(label){ | 
		
	
		
			
			|  |  |  | var performPull = (repo) => { | 
		
	
		
			
			|  |  |  | if(existsSync(repo)) { | 
		
	
		
			
			|  |  |  | console.log('pulling ' + repo) | 
		
	
		
			
			|  |  |  | return nodeShellExec.apply(null, getPullCmd(repo)).catch((e)=>{ | 
		
	
		
			
			|  |  |  | errors.push({ repo , e}) | 
		
	
		
			
			|  |  |  | console.error(e) }) | 
		
	
		
			
			|  |  |  | return nodeShellExec.apply(null, getPullCmd(repo)).then((srepo)=>{ | 
		
	
		
			
			|  |  |  | repolog.statuslog(null, srepo)}).catch((e)=>{ console.error(e) }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | else { | 
		
	
		
			
			|  |  |  | console.log('cloning ' + repo) | 
		
	
		
			
			|  |  |  | // PB : TODO -- detect if a clonable repo exists in currentGitAuthUser | 
		
	
		
			
			|  |  |  | return nodeShellExec('git', ['clone', '-c', 'core.symlinks=true', defaultRepoServer + `/${defaultRepoOwner}/` + repo + '.git'], | 
		
	
		
			
			|  |  |  | { | 
		
	
	
		
			
			|  |  | @@ -795,7 +793,15 @@ var __runcmd = function(label){ | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | if(!processedArgs.runas) gitRepos.forEach(performPull) | 
		
	
		
			
			|  |  |  | if(!processedArgs.runas) { | 
		
	
		
			
			|  |  |  | var pendingpulls = []; | 
		
	
		
			
			|  |  |  | gitRepos.forEach( (r)=>{ | 
		
	
		
			
			|  |  |  | pendingpulls.push(performPull(r)) | 
		
	
		
			
			|  |  |  | } ) | 
		
	
		
			
			|  |  |  | Promise.all(pendingpulls).then(results =>{ | 
		
	
		
			
			|  |  |  | console.log(repolog.log.SUCCESS) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | return isRunningElevated().then( | 
		
	
		
			
			|  |  |  | (isElevated) => { | 
		
	
		
			
			|  |  |  | if(isElevated) { | 
		
	
	
		
			
			|  |  | @@ -1250,4 +1256,3 @@ function nodeShellExec() { | 
		
	
		
			
			|  |  |  | p.process = child; | 
		
	
		
			
			|  |  |  | return p; | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 |