contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
83 stars 33 forks source link

use copy and unlink for Windows OS #738

Closed MDevster closed 1 year ago

MDevster commented 1 year ago

During self-update on windows the manager can no longer rename the file.

grafik

I took a closer look, the problem is that the self-update wants to "update" the phar.php via rename. This does not work correctly under Windows. So I thought to myself, that can't be that it works for composer and not for the manager :wink: And look, composer had the problem too ... and switched to copy for Windows https://github.com/composer/composer/commit/07f59a91624611b3c91477d2a1e6f6a2ce45aa5e#diff-b94d538399979b0c8d2689da7[...]6df384993c58e2e924c640dea1R428

This PR will fix the issue for Windows. Perhaps the downgrade process needs some attention as well, possibly other places https://github.com/contao/contao-manager/blob/main/downgrade.php#L36

aschempp commented 1 year ago

Thank you @MDevster