diff --git a/src/PharoLauncher-Core/PhLVmProviderUntilPharo80.class.st b/src/PharoLauncher-Core/PhLVmProviderUntilPharo80.class.st index d7367112..7ae18c3e 100644 --- a/src/PharoLauncher-Core/PhLVmProviderUntilPharo80.class.st +++ b/src/PharoLauncher-Core/PhLVmProviderUntilPharo80.class.st @@ -31,7 +31,10 @@ PhLVmProviderUntilPharo80 >> downloadPathOSTypeSegment [ { #category : #'private - accessing' } PhLVmProviderUntilPharo80 >> imageArchitecture [ - ^ vmManager is64bit ifTrue: [ '64' ] ifFalse: [ '' ] + " No 64-bit image before Pharo 6.0" + ^ (vmManager is64bit and: [ vmManager pharoVersion > '50' ]) + ifTrue: [ '64' ] + ifFalse: [ '' ] ] { #category : #private } diff --git a/src/PharoLauncher-Tests-Download/PhLVmProviderUntilPharo80Test.class.st b/src/PharoLauncher-Tests-Download/PhLVmProviderUntilPharo80Test.class.st index 01b6cbed..864c83b1 100644 --- a/src/PharoLauncher-Tests-Download/PhLVmProviderUntilPharo80Test.class.st +++ b/src/PharoLauncher-Tests-Download/PhLVmProviderUntilPharo80Test.class.st @@ -25,3 +25,15 @@ PhLVmProviderUntilPharo80Test >> testUrlIsValidAndAvailable [ self assert: (url asString includesSubstring: '64'). self assert: (ZnEasy head: url) isSuccess ] + +{ #category : #tests } +PhLVmProviderUntilPharo80Test >> testUrlIsValidAndAvailableWhenOs64BitAndImageAvailableOnlyIn32Bits [ + | url vm | + vm := (PhLVirtualMachine id: '40-x86'). + vmProvider := PhLVmProvider for: vm. + url := vmProvider url. + + self assert: (url asString includesSubstring: '40'). + self deny: (url asString includesSubstring: '64'). + self assert: (ZnEasy head: url) isSuccess +]