Upgrading in CI fails because of manually edited file

I have a problem with the upgrade-script here: invoiceninja5_ynh/upgrade at 5.3.1 · YunoHost-Apps/invoiceninja5_ynh · GitHub

Here’s the output of the CI: YunoRunner for CI

It always reports a changed .env file. The diff shows that the before-file is the template-file that gets used in ynh_add_config --template="default.env" --destination="$final_path/.env".

However I expect that there is no diff. Can anyone point me in the right direction why this happens?
After upgrading the app there is no diff between the .env before and after the upgrade.

Hey there !

Indeed, the proper way is probably to add --keep="$final_path/.env" here : invoiceninja5_ynh/upgrade at 5.3.1 · YunoHost-Apps/invoiceninja5_ynh · GitHub

1 Like

Thanks @Aleks, this was it!
Note however that it is --keep=".env" without the $final_path.