pharo-project / pharo-launcher

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

Use last initializationn script when you create a new image #634

Open akevalion opened 1 year ago

akevalion commented 1 year ago

When you create an image will would be nice to use the last initialization script

for example you can create a file like credentials.st

Author uniqueInstance fullName: 'YourName'.
IceCredentialStore current
    storeCredential: (IceTokenCredentials new
    username: 'YOURUSERNAME';
    token: 'YOUR_github_token';
    yourself)
    forHostname: 'github.com'.

And when you create new images you will use by default this configuration

demarey commented 1 year ago

Hi @akevalion

Thank you for the proposal and the PR! Initialization script is thought to easily load your business code in a fresh Pharo image. If you work on many projects, you will have many initialization scripts: one by project. You do not always want to execute an initialization script and even less the last executed one. Why don't you use the standard Pharo feature to rerun as script at image startup to store your credentials? Most people use this possibility to manage credentials (See Pharo System menu / Startup / Version or General preferences folder).

akevalion commented 1 year ago

This PR will not execute the last one, but is going to select the last script you used Yes I will check the standard Pharo feature