YunoHost-Apps / code-server_ynh

Code-server packaged for YunoHost
https://github.com/cdr/code-server
MIT License
6 stars 2 forks source link

[autopatch] TEST BEFORE MERGE ynh_setup_source --full_replace=1 #84

Open Salamandar opened 4 months ago

Salamandar commented 4 months ago

This is an automatic PR

This is an automated patch to potentially fix a bug in the upgrade script.

ynh_setup_source doesn't overwrite the destination directory, but rather extracts the source in the existing directory.

This might lead to weird cases where legacy source files aren't deleted.

The command has an argument --full_replace=1 that fixes this behaviour.

BE CAREFUL because this change might lead to data losses! You should check that all the patches calls to ynh_setup_source do exactly what you expect to do and don't delete user data.

If you want exclude some files from being overwritten/deleted, use the --keep argument, just like that:

ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config/config.yaml"
Tagadda commented 4 months ago

!testme

yunohost-bot commented 4 months ago

:stuck_out_tongue_winking_eye: Test Badge

Salamandar commented 4 months ago

@Tagadda you’ll need to add config.yaml and code-server.env to the --keep argument :)

Tagadda commented 4 months ago

I'll look for other files on y machine before the merge

Tagadda commented 4 months ago

@Tagadda you’ll need to add config.yaml and code-server.env to the --keep argument :)

@Salamandar In fact those files are generated right after https://github.com/YunoHost-Apps/code-server_ynh/pull/84/files#diff-57aeb84da86cb7420dfedd8e49bc644fb799d5413d01927a0417bde753e8922fR90-R91