sindresorhus / electron-is-dev

Check if Electron is running in development
MIT License
427 stars 34 forks source link

This module may break soon #2

Closed zeke closed 8 years ago

zeke commented 8 years ago

A kind soul (@logicalparadox) has allowed us to take over the electron package name on npm, and we are beginning the process of publishing electron-prebuilt and electron in tandem for a while.

If a user installs the new electron, this package in its current form will not be able to detect that, because it's looking for -prebuilt in the path name:

module.exports = process.defaultApp || /[\\/]electron-prebuilt[\\/]/.test(process.execPath);

Context: https://github.com/electron-userland/electron-prebuilt/issues/160

parro-it commented 8 years ago

Thank you for the notice @zeke. We was planning to change the check and use an env variable. We are discussing it here and here

I did a PR on electron-prebuilt to make it set such variable, so that we can check it.

This should solve the name change problem.

zeke commented 8 years ago

cc @kevinsawicki who suggested there might be a baked-in way to do this already.