File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ const userAgent = format(
1515 os . platform ( ) ,
1616 os . arch ( )
1717)
18+ const supportedPlatforms = [ 'darwin' , 'win32' ]
1819
1920module . exports = function updater ( opts = { } ) {
2021 // check for bad input early, so it will be logged during development
@@ -42,6 +43,12 @@ function initUpdater (opts) {
4243 logger . log ( ...args )
4344 }
4445
46+ // exit early on unsupported platforms, e.g. `linux`
47+ if ( typeof process !== 'undefined' && process . platform && ! supportedPlatforms . includes ( process . platform ) ) {
48+ log ( `Electron's autoUpdater does not support the '${ process . platform } ' platform` )
49+ return
50+ }
51+
4552 log ( 'feedURL' , feedURL )
4653 log ( 'requestHeaders' , requestHeaders )
4754 autoUpdater . setFeedURL ( feedURL , requestHeaders )
You can’t perform that action at this time.
0 commit comments