On 28 Nov 2016, at 15:08, Damien Pollet <damien.pollet+pharo@gmail.com> wrote:
So⦠if I read that code correctly, when you pass both --save and --quit, the image will first save itself and quit (with an unspecified return code, or the one picked by the snapshot code). Then, next time you run this image, it will resume execution and exit immediately (that time with an explicit success return code).
*¬_¬ not sure if stupid code or stupid me*
Yeah, it does not add up, I think the last expression/test should not be there. This save&quit / resume is sometimes hard to reason about (BTW, I am looking at this in 4.0).
On 28 November 2016 at 13:23, Sven Van Caekenberghe <sven@stfx.eu> wrote: Hi Dimitris,
According to
STCommandLineHandler>>#end | quit |
quit := self commandLine hasOption: 'quit'.
(self commandLine hasOption: 'save') ifTrue: [ Smalltalk snapshot: true andQuit: quit ].
quit ifTrue: [ self exitSuccess ].
You should be able to combine --quit and --save to get the desired effect but I haven't tested it.
BTW, command line usage of Pharo works very well (and has been working well for years).
Sven
On 28 Nov 2016, at 12:13, Dimitris Chloupis <kilon.alios@gmail.com> wrote:
How to execute a script from command line , then save the image and exit ?
I use the st command but it offers either --save which saves but keeps image opened or --exit the exits the image without saving
./pharo Ephestos.image st --save test.st