Open MTRNord opened 7 years ago
This seems like a good enhancement.....not sure how it would be implemented though because basically the solution to that is to not autoUpdater.checkForUpdates
when --squirrel-firstrun
is in the app args (see https://github.com/electron/electron/issues/7155#issuecomment-245993316)
Can it be done with electron-builder?
var autoUpdater = require('electron-auto-updater').autoUpdater;
let squirrelEvent = process.argv[1];
if (squirrelEvent !== '--squirrel-firstrun')
autoUpdater.checkForUpdates();
Electron-builder doesn't use Squirrel.windows by default.
Then how can we detect the '--squirrel-firstrun' when using electron-builder?
Please file issue to electron-builder and explain what do you want to achieve.
It is the same issue asked here: How to avoid Autoupdater crashing when squirrel is doing its first run?
In order to avoid that we'd need to detect the --squirrel-firstrun
flag, so in order to answer this question, we need to answer this other question: how can we detect the --squirrel-firstrun
flag with Electron-builder?
If you suggest so I will open a separated issue, but in my eyes it would be redundant to this one
If you can — just do not use Squirrel, default target for Windows is nsis.
How can I check if NO installer is running? Because when it runs the Autoupdater crash because there is an lock file.