mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 17:26:34 +00:00
Merge pull request #2506 from resin-io/fix-64-bit-detection
fix: Fix 64 bit detection on arm
This commit is contained in:
commit
161debb35a
@ -72,7 +72,7 @@ class ChecksumStream extends stream.Transform {
|
||||
if (algorithm === 'xxhash') {
|
||||
// Seed value 0x45544348 = ASCII "ETCH"
|
||||
const seed = 0x45544348
|
||||
const is64Bit = process.arch === 'x64' || process.arch === 'aarch64'
|
||||
const is64Bit = [ 'x64', 'arm64', 'ppc64' ].includes(process.arch)
|
||||
hash = new xxhash.Stream(seed, is64Bit ? 64 : 32, Buffer.allocUnsafe(is64Bit ? 8 : 4))
|
||||
} else {
|
||||
hash = _.attempt(crypto.createHash, algorithm)
|
||||
|
Loading…
x
Reference in New Issue
Block a user