CityBEM-CityLayers-SaeedRay.../node_modules/electron-rebuild/lib/test/helpers/electron-version.js

20 lines
771 B
JavaScript
Raw Normal View History

"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