diff --git a/scripts/upgrade b/scripts/upgrade index 35ca7e3..e3a8997 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -75,14 +75,14 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=5 - git config --system --add safe.directory $final_path + chown -R $app:www-data "$final_path" # Download, check integrity, uncompress and patch the source from app.src pushd "$final_path" - git checkout master - git pull --quiet - git checkout $COMMIT --quiet - git submodule update --init --recursive --quiet + ynh_exec_as $app git checkout master + ynh_exec_as $app git pull --quiet + ynh_exec_as $app git checkout $COMMIT --quiet + ynh_exec_as $app git submodule update --init --recursive --quiet popd fi