20 lines
771 B
JavaScript
20 lines
771 B
JavaScript
|
"use strict";
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
exports.getExactElectronVersionSync = void 0;
|
||
|
const fs = require("fs-extra");
|
||
|
const path = require("path");
|
||
|
function electronVersionPath() {
|
||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||
|
const electronPath = require('electron');
|
||
|
if (process.platform === 'darwin') {
|
||
|
return path.resolve(path.dirname(electronPath), '..', '..', '..', 'version');
|
||
|
}
|
||
|
else {
|
||
|
return path.join(path.dirname(electronPath), 'version');
|
||
|
}
|
||
|
}
|
||
|
function getExactElectronVersionSync() {
|
||
|
return fs.readFileSync(electronVersionPath()).toString().trim();
|
||
|
}
|
||
|
exports.getExactElectronVersionSync = getExactElectronVersionSync;
|
||
|
//# sourceMappingURL=electron-version.js.map
|