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*

On 28 November 2016 at 13:23, Sven Van Caekenberghe <s...@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.al...@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
>
>
>

Reply via email to