diff --git a/utils/exit-on-error.js b/utils/exit-on-error.js index 53510d49..019cc00c 100644 --- a/utils/exit-on-error.js +++ b/utils/exit-on-error.js @@ -12,8 +12,7 @@ process.on('exit', () => { detached: true, env: { NEAR_CLI_EVENT_ID: eventtracking.EVENT_ID_ERROR, - NEAR_CLI_EVENT_DATA: JSON.stringify(crashEventProperties), - NEAR_CLI_OPTIONS: process.env.NEAR_CLI_OPTIONS + NEAR_CLI_EVENT_DATA: JSON.stringify(crashEventProperties) } }); }); @@ -23,15 +22,13 @@ module.exports = (promiseFn) => async (...args) => { process.env.NEAR_CLI_ERROR_LAST_COMMAND = command; process.env.NEAR_CLI_NETWORK_ID = require('../get-config')()['networkId']; const options = args[0]; - const optionsAsStr = JSON.stringify(options); const eventId = `event_id_shell_${command}_start`; require('child_process').fork(__dirname + '/log-event.js', ['node'], { silent: true, detached: true, env: { NEAR_CLI_EVENT_ID: eventId, - NEAR_CLI_EVENT_DATA: JSON.stringify({}), - NEAR_CLI_OPTIONS: optionsAsStr + NEAR_CLI_EVENT_DATA: JSON.stringify({}) } }); const promise = promiseFn.apply(null, args); @@ -39,7 +36,6 @@ module.exports = (promiseFn) => async (...args) => { await promise; } catch (e) { process.env.NEAR_CLI_LAST_ERROR = e.message; - process.env.NEAR_CLI_OPTIONS = optionsAsStr; inspectResponse.prettyPrintError(e, options); process.exit(1); } diff --git a/utils/log-event.js b/utils/log-event.js index 0ef05fb5..939ca659 100644 --- a/utils/log-event.js +++ b/utils/log-event.js @@ -2,5 +2,4 @@ const eventtracking = require('./eventtracking'); eventtracking.track( process.env.NEAR_CLI_EVENT_ID, - JSON.parse(process.env.NEAR_CLI_EVENT_DATA), - JSON.parse(process.env.NEAR_CLI_OPTIONS)); \ No newline at end of file + JSON.parse(process.env.NEAR_CLI_EVENT_DATA)); \ No newline at end of file