Browse Source

Use now uses junctions.

pull/1/head
Pradeep Bhaskaran 4 years ago
parent
commit
6606a82dda
1 changed files with 30 additions and 17 deletions
  1. 30
    17
      index.js

+ 30
- 17
index.js View File

, 'loopback-connector-ds' , 'loopback-connector-ds'
, 'chess-server-lib' , 'chess-server-lib'
, 'setup' , 'setup'
, 'elixir-client-todos'
, 'elixir-client-unlinked'
, 'ember-service-worker.git'
, 'ember-service-worker-asset-cache.git'
, 'ember-service-worker-cache-fallback.git'
, 'ember-service-worker-index.git'
, 'ember-sw-client-route.git'
] ]


// Repositiories that have symlinks that required elevated priviletes in windows to create symlinks // Repositiories that have symlinks that required elevated priviletes in windows to create symlinks
) )
.catch(()=>{ .catch(()=>{
console.log('Not Elevated'); console.log('Not Elevated');
console.log('Requesting Elevated Privileges')
nodeShellExec('MSHTA', [`javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('node', 'elxr ${processedArgs._[0]} ${processedArgs._[1]} ${processedArgs._[2]} --runas=true', '', 'runas', 1);close();`]
console.dir(processedArgs)
console.log('Requesting Elevated Privileges for : ' + `--insptec-brk elxr ${processedArgs._[0]} ${processedArgs._[1]} --runas=true`)
nodeShellExec('MSHTA', [`javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('node', 'elxr ${processedArgs._[0]} ${processedArgs._[1]} --runas=true', '', 'runas', 1);close();`]
, { , {
// inherit : true // inherit : true
// , shell: true // , shell: true
console.log('runconfig.use : ' + runconfig.use) console.log('runconfig.use : ' + runconfig.use)
var tasks = [ var tasks = [
()=>{ ()=>{
var p = nodeShellExec('rm', ['config'], {
inherit : true, shell: true
, cwd : repo
, env: process.env
, title : `rm 'package-lock.json' for ${repo}`
}).catch((e)=>{ console.error(e) })
return p;
if(existsSync('config')) {
var p = nodeShellExec('rmdir', ['config'], {
inherit : true, shell: true
, env: process.env
, title : `rmdir config`
}).catch((e)=>{ console.error(e) })
return p;
}
else return Promise.resolve(true);
}, },
()=>{ ()=>{
var p = nodeShellExec('rm', ['data'], {
inherit : true, shell: true
, cwd : repo
, env: process.env
, title : `rm 'package-lock.json' for ${repo}`
}).catch((e)=>{ console.error(e) })
return p;
if(existsSync('data')) {
var p = nodeShellExec('rmdir', ['data'], {
inherit : true, shell: true
, env: process.env
, title : `rm data`
}).catch((e)=>{ console.error(e) })
return p;
}
else return Promise.resolve(true);
}, },
()=>{ ()=>{
var p = nodeShellExec('mklink', ['/D', 'data', runconfig.use + '-data'], { var p = nodeShellExec('mklink', ['/D', 'data', runconfig.use + '-data'], {
return p; return p;
}, },
()=>{ ()=>{
var p = nodeShellExec('mklink', ['/D', 'config', runconfig.use + '-config'], {
// Use junctions to avoid npm package issues
var p = nodeShellExec('mklink', ['/J', 'config', runconfig.use + '-config'], {
inherit : true, shell: true inherit : true, shell: true
, env: process.env , env: process.env
}).catch((e)=>{ console.error(e) }) }).catch((e)=>{ console.error(e) })

Loading…
Cancel
Save