tiro-notes 0.27.26 → 0.27.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,10 +45,10 @@ const execCmd = (cmd, params, p) => {
45
45
  if (!p) p = {}
46
46
  if (!p.env) p.env = {}
47
47
  if (!p.platform) p.platform = false
48
- if (!p.logName) p.logName = ''
48
+ p.logName = !p.logName ? '' : `${p.logName} `
49
49
  const log = whichLog(p);
50
50
 
51
- log(`ExecCMD ${JSON.stringify({cmd, params, p})}`);
51
+ log(`[${p.logName}] === ExecCMD ${JSON.stringify({cmd, params, p})}`);
52
52
 
53
53
  let child
54
54
  let spawn = require( 'child_process' ).spawn;
@@ -62,9 +62,10 @@ const execCmd = (cmd, params, p) => {
62
62
  });
63
63
  child.stderr.on( 'data', data => {
64
64
  const str = `[${p.logName} ${cmd} ERROR!] : ${data}`;
65
- log( str );
65
+ console.log( str );
66
+ if (p && p.onLog) p.onLog(str)
66
67
  });
67
- log(`ExecCMD SUCCESS ${JSON.stringify({cmd, params, p})}`);
68
+ if (p && p.onDone) p.onDone()
68
69
  return child;
69
70
  }
70
71