23 lines
No EOL
640 B
JavaScript
23 lines
No EOL
640 B
JavaScript
'use strict';
|
|
const { app } = require('electron');
|
|
const cp = require('child_process');
|
|
const os = require('os');
|
|
const path = require('path');
|
|
const getTempDirectory = function () {
|
|
try {
|
|
return app.getPath('temp');
|
|
}
|
|
catch (_a) {
|
|
return os.tmpdir();
|
|
}
|
|
};
|
|
exports.crashReporterInit = function (options) {
|
|
const productName = options.productName || app.getName();
|
|
const crashesDirectory = path.join(getTempDirectory(), `${productName} Crashes`);
|
|
return {
|
|
productName,
|
|
crashesDirectory,
|
|
appVersion: app.getVersion()
|
|
};
|
|
};
|
|
//# sourceMappingURL=crash-reporter-init.js.map
|