Closed cdlm closed 1 year ago
See PhLLaunchImageProcessConfigurator >> visit
:
visit
process := PhLProcessWrapper new.
process workingDirectory: self imageFile parent pathString.
…
(a quick test after changing that seems to work, PR incoming)
@cdlm Hi Damien! It's been a while since you did this change, but could you look at it? CI is failing after integration, see: https://ci.inria.fr/pharo-ci-jenkins2/job/PharoLauncher-Pipeline/job/feature%252Fcmd-line/18/console I think this is because workingDirectory on image launch configuration returns nil. Probably existing images have already referring to launch config objects:
PhLImage>>defaultLaunchConfiguration
^ launchConfigurations
detect: [ :each | each name = PhLLaunchConfiguration defaultName ]
ifNone: [ PhLLaunchConfiguration defaultWithImage: self ]
probably existing image launch configuration instances need to be re-initialized with correct working directory. What do you think?
Waiting to CI to be up again. It should be fixed. by PR #604
Resolved by linked PRs.
Context: launching an image via CLI, using the
pharo-launcher image launch IMAGENAME
commandWhat happens: the working directory is the image directory (
FileSystem disk workingDirectory = FileLocator imageDirectory asFileReference
is true).This is a problem because the user context is lost.
What should happen: the working directory (value of
$PWD
in the shell that invokes thepharo-launcher
wrapper script) should be inherited by the image.