Browse Source

Fixed initialization issue

master
Aksha Thomas 3 years ago
parent
commit
8ba64484bf
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      index.js

+ 5
- 2
index.js View File

@@ -2321,9 +2321,12 @@ acquireElevationState().then(() => {
// PB : TODO -- processedArgs should already be part of selected.
var instanceName = processedArgs._[1] = processedArgs._[1] || chessinstances.current_run.instanceName || selected.instanceName;
var node_env = processedArgs.node_env = processedArgs.node_env || chessinstances.current_run.node_env || selected.node_env;
chessinstances[instanceName] = chessinstances[instanceName] || {}
chessinstances[instanceName][node_env] = chessinstances[instanceName][node_env] || selected;
chessinstances['current_run'] = chessinstances[instanceName][selected.node_env] ?
{ instanceName: instanceName, node_env: node_env } : chessinstances['current_run']
// chessinstances[chessinstances.current_run.instanceName] = chessinstances[chessinstances.current_run.instanceName] || {}
{ instanceName: instanceName, node_env: node_env } : (chessinstances['current_run'] || { instanceName: instanceName, node_env: node_env })

// chessinstances[chessinstances.current_run.instanceName] = chessinstances[chessinstances.current_run.instanceName] || {}

if(path.normalize(selected.root) !== path.normalize(chessinstances[instanceName][node_env].root)) {
throw "Mismatched chessinstances config found " + chessinstances[instanceName][node_env].root + ' does not match ' + selected.root

Loading…
Cancel
Save