HeliosLauncher/app/assets/js/isdev.js

10 lines
363 B
JavaScript
Raw Normal View History

2022-07-14 12:25:24 -07:00
/**
* @author Daniel D. Scalzi
* @license CC-BY-NC 4.0 - https://creativecommons.org/licenses/by-nc/4.0/
*/
'use strict'
const getFromEnv = parseInt(process.env.ELECTRON_IS_DEV, 10) === 1
const isEnvSet = 'ELECTRON_IS_DEV' in process.env
module.exports = isEnvSet ? getFromEnv : (process.defaultApp || /node_modules[\\/]electron[\\/]/.test(process.execPath))