Add ProcessWrapper class exists testing
MODIFY
src/PharoLauncher-Download.package/PhLProcessWrapper.class/class/isCommandAvailable..st
src/PharoLauncher-Download.package/PhLProcessWrapper.class/class/isCommandAvailable..st
testing
isCommandAvailable: aCommand
- ^ Smalltalk os isWindows
- ifTrue: [ (ProcessWrapper new
+ Smalltalk os isWindows
+ ifTrue: [ Smalltalk
+ at: #ProcessWrapper
+ ifPresent: [ :processWrapperClass |
+ ^ (processWrapperClass new
useStderr;
waitForExit;
startWithShellCommand: aCommand;
- yourself) stderrStream atEnd ]
- ifFalse: [ (OSProcess waitForCommand: aCommand) succeeded ]
\ No newline at end of file
+ yourself) stderrStream atEnd ] ].
+ ^ (OSProcess waitForCommand: aCommand) succeeded
\ No newline at end of file

MODIFY
src/PharoLauncher-Download.package/PhLProcessWrapper.class/class/waitForCommand..st
src/PharoLauncher-Download.package/PhLProcessWrapper.class/class/waitForCommand..st
instance creation
waitForCommand: aCommand
^ self new
- process: (Smalltalk os isWindows
+ process: ((Smalltalk os isWindows and: [ Smalltalk includesKey: #ProcessWrapper ])
ifTrue: [ self waitForWindowsCommand: aCommand ]
ifFalse: [ self waitForLinuxCommand: aCommand ]);
yourself
\ No newline at end of file

MODIFY
src/PharoLauncher-Download.package/PhLProcessWrapper.class/class/waitForWindowsCommand..st
src/PharoLauncher-Download.package/PhLProcessWrapper.class/class/waitForWindowsCommand..st
instance creation
waitForWindowsCommand: aCommand
- ^ ProcessWrapper new
+ ^ (Smalltalk at: #ProcessWrapper) new
startWithShellCommand: aCommand;
waitForExit;
yourself
\ No newline at end of file

Add ProcessWrapper class exists testing