pharo-project / pharo-launcher

Lets you manage your pharo images and download new ones
https://pharo-project.github.io/pharo-launcher/
MIT License
108 stars 46 forks source link

DiskStore checkVMVersion is not properly handled on CLI #564

Open Bajger opened 2 years ago

Bajger commented 2 years ago

Describe the bug DiskStore checkVMversion call #inform: that causes stacktrace output when running image with older (not updated) VM.

To Reproduce Steps to reproduce the behavior:

  1. Use older VM for running images
  2. Create sample image using `./pharo-laucher.sh image create PhLTestImage "
  3. run /pharo-launcher.sh image launch PhLTestImage
  4. Stacktrace is printed on output there should be just inform message or warning.

Expected behavior Instead of looking at stacktrace, there should be just inform or warning message printed, command

Expected development cost Stacktrace is because DiskStore checkVMVersion calls Object>>#inform: that is causing a stacktrace output, when launch command is executed Modify Object>>#inform: method or use handler in command execution that would catch exception.

Additional context This is result of ./pharo-launcher.sh image launch PhLTestImage

Your VM is too old for this image. Please download the latest VM.
StartupUIManager>>inform:
DiskStore class(Object)>>inform:
[ 
            ^ self inform:
                  'Your VM is too old for this image. Please download the latest VM.' ] in DiskStore class>>checkVMVersion in Block: [ ...
[ :arg1 | tmp1 value ] in DiskStore class>>checkVMVersion in Block: [ :arg1 | tmp1 value ]
FullBlockClosure(BlockClosure)>>cull:
Context>>evaluateSignal:
Context>>handleSignal:
Error(Exception)>>signal
Error(Exception)>>signal:
Time class>>readFrom:
DateAndTime class>>readFrom:defaultOffset:
DateAndTime class>>readFrom: