Entirely remove the execution of command to ensure execution rights when opening the vm manager.
MODIFY
src/PharoLauncher-Core/PhLVirtualMachine.class.st
src/PharoLauncher-Core/PhLVirtualMachine.class.st
@@ -110,6 +110,20 @@ PhLVirtualMachine >> downloadUrl [
format: { self pharoVersion . self archPath . self manager downloadPathOSTypeSegment . self flavour . self blessing }
]
+{ #category : #updating }
+PhLVirtualMachine >> ensureExecutionRights [
+ "Unzipping with Pharo does not preserve unix rights and so, the pahro VM executable does not have the execution permission.
+ We have to set it explicitely on Unix and OS X."
+
+ Smalltalk os isWindows ifTrue: [ ^ self ].
+
+ PhLProcessWrapper new
+ shellCommand;
+ addArguments: 'chmod u+x';
+ in: [ :command | self executablesToEnsure do: [ :file | command addArgument: file fullName surroundedByDoubleQuotes ] ];
+ runAndWaitTimeOut: 5 seconds
+]
+
{ #category : #setting }
PhLVirtualMachine >> executable: aPathOrfileReference [
executableRef := aPathOrfileReference asFileReference
@@ -288,7 +302,7 @@ PhLVirtualMachine >> updateFromUrl [
self manager class fetch: self downloadUrl to: self vmStore / (self id , '.zip').
self initializeExecutableRefFrom: self vmStore / self id.
- self manager ensureExecutionRightsOf: {self}
+ self ensureExecutionRights
]
{ #category : #accessing }

MODIFY
src/PharoLauncher-Core/PhLVirtualMachineManager.class.st
src/PharoLauncher-Core/PhLVirtualMachineManager.class.st
@@ -294,23 +294,6 @@ PhLVirtualMachineManager >> downloadPathOSTypeSegment [
]
-{ #category : #querying }
-PhLVirtualMachineManager >> ensureExecutionRightsOf: aCollectionOfVms [
- "Unzipping with Pharo does not preserve unix rights and so, the pahro VM executable does not have the execution permission.
- We have to set it explicitely on Unix and OS X."
-
- | executables command |
- Smalltalk os isWindows ifTrue: [ ^ self ].
-
- executables := aCollectionOfVms flatCollect: #executablesToEnsure.
- command := PhLProcessWrapper new
- shellCommand;
- addArguments: 'chmod u+x';
- yourself.
- executables do: [ :file | command addArgument: file fullName surroundedByDoubleQuotes ].
- command runAndWaitTimeOut: 5 seconds
-]
-
{ #category : #private }
PhLVirtualMachineManager >> fetchCompatibleVm [
[ self class
@@ -545,12 +528,10 @@ PhLVirtualMachineManager >> virtualMachine [
{ #category : #querying }
PhLVirtualMachineManager >> virtualMachines [
- | vmsInVmStore defaultVms allVms |
+ | vmsInVmStore defaultVms |
defaultVms := self defaultVirtualMachines.
vmsInVmStore := self availableVirtualMachines values reject: [ :vm | defaultVms anySatisfy: [ :diskVM | diskVM id = vm id ] ].
- allVms := vmsInVmStore , defaultVms.
- self ensureExecutionRightsOf: allVms.
- ^ allVms
+ ^ vmsInVmStore , defaultVms
]
{ #category : #querying }

Entirely remove the execution of command to ensure execution rights when opening the vm manager.