nuts icon indicating copy to clipboard operation
nuts copied to clipboard

Fail to detect osx_64 platform when "32" is part of version number

Open alexstrat opened this issue 9 years ago • 1 comments

By default, for OSX, electron-builder generates files with names {app_name}-{version}-mac.zip and {app_name}-{version}.dmg.

As soon as the filename includes 32, for instance in version part, and does not explicitly mention x64, the platform is incorrectly detected as osx_32:

var platforms = require('./lib/utils/platforms');

platforms.detect('myapp-0.31.1-mac.zip') // 'osx_64' ok
platforms.detect('myapp-0.32.1-mac.zip') // 'osx_32' not ok

platforms.detect('myapp-0.31.1.dmg') // 'osx_64' ok
platforms.detect('myapp-0.32.1.dmg') // 'osx_32' not ok

// for info:
platforms.detect('myapp-0.32.1-darwin-x64.zip') // 'osx_64' ok

alexstrat avatar Dec 22 '16 17:12 alexstrat

Same for Windows:

var platforms = require('./lib/utils/platforms');

platforms.detect('Station.Setup.0.1.64.exe') // 'windows_64' not ok
platforms.detect('Station.Setup.0.1.63.exe') // 'windows_32' ok

alexstrat avatar May 30 '17 07:05 alexstrat