From 8279a30cdbf03ee43bf76d3545ed9f5278138400 Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Wed, 21 Dec 2022 15:57:31 +0100 Subject: [PATCH] fixes #585 --- .../PhLVmProviderUntilPharo80.class.st | 5 ++++- .../PhLVmProviderUntilPharo80Test.class.st | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) 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 +]