Browse Source

Fixed non fatal error messages

production
pb 2 years ago
parent
commit
47b0116a7f
2 changed files with 13 additions and 4 deletions
  1. 12
    3
      index.js
  2. 1
    1
      win_verse.js

+ 12
- 3
index.js View File

@@ -65,7 +65,7 @@ Tasq.addlistener(statuslog.statuslog)
// Instead of waiting for the root to be establised we start working at the current locatoin and then relocate when root changes.
var runlogjson = `${selectedinstance.root}/.elxr/run-${runtimestamp}/run.log`
ensureDirectoryExistence(runlogjson)
fs.writeFileSync(runlogjson, JSON.stringify( `Started ${runtimestamp}`)) // Initialize a new log file with "logrotate" for every run
fs.writeFileSync(runlogjson, JSON.stringify( { message : `Started ${runtimestamp}`, success:true})) // Initialize a new log file with "logrotate" for every run
Tasq.addlistener((e)=>{ fs.writeFileSync(runlogjson, ', ' + JSON.stringify( e ), { 'flag': 'a+' }) })
var cli = require('./cliverse')
function isWin(){ return /^win/.test(process.platform) }
@@ -3081,12 +3081,14 @@ var configs = (function(){
return __acquireConfig(selected, { remote : 'userfork' } // PB : TODO -- accessiblity state should switch to public etc..
, selected.instanceName + '-config-' + selected.node_env + `-${clusternodename}`
, function(e){ console.info('Customized node level config not found. This is not an Error. Will attempt with owner level config.');
e.benign = true
return e; }
)
}
, ownerInstnace(selected) { return __acquireConfig(selected, { remote : 'userfork' }
, selected.instanceName + '-config-' + selected.node_env
, function(e){ console.info('Customized user level config not found. This is not an Error. Will attempt global common instance config.');
e.benign = true
return e }
)
}
@@ -3145,12 +3147,14 @@ var instanceData = (function(){
return __acquireData(selected, { remote : 'userfork' }
, selected.instanceName + '-data-' + selected.node_env + `-${clusternodename}`
, function(e){ console.info('Customized node level data not found. This is not an Error. Will attempt with owner level config.');
e.benign = true
return e; }
)
}
, ownerInstnace(selected) { return __acquireData(selected, { remote : 'userfork' }
, selected.instanceName + '-data-' + selected.node_env
, function(e){ console.info('Customized user level data not found. This is not an Error. Will attempt global common instance config.');
e.benign = true
return e }
)
}
@@ -3185,11 +3189,16 @@ function resetgitconfig(){
// https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage
// Git Credential storage...
// git config --global credential.helper 'store --file ~/.gitcredentials'
// git credential fill
// protocol=https
// host=git.bbh.org.in
// username=bob
// password=pppp
// git credential-store --file ~/.gitcredentials store

// // notepad C:/Program Files/Git/etc/gitconfig
// git config --edit --system
// git config --global credential.helper "store --file ~/gitcredentials"
// git credential fill
// git credential-store --file ~/git.store store
// Find system git config

+ 1
- 1
win_verse.js View File

@@ -109,8 +109,8 @@ var shell_verse = {
return r;
}).catch((e) => {
e.info = taskToRun.info;
taskToRun.statuslog.statuslog(e);
if(taskToRun.errHandler) throw taskToRun.errHandler(e)
taskToRun.statuslog.statuslog(e); //
// console.error(e)
throw e;
}).finally(()=>{})

Loading…
Cancel
Save