Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up properly if self-update fails #10475

Merged
merged 1 commit into from
Jan 21, 2022
Merged

Conversation

johnstevenson
Copy link
Member

If self-update fails because the downloaded file cannot be renamed or copied, it is left wherever it was downloaded to. Because it was always given the same name (composer-temp.phar), this didn't seem much of a problem - and could allow the user to manually move it if things got hairy.

However, it is now given a randomized name (3bb78fd) which produces multiple files, so this fix deletes the downloaded file on self-update failure.

@Seldaek Seldaek merged commit 0228e5b into composer:2.2 Jan 21, 2022
@Seldaek Seldaek added this to the 2.2 milestone Jan 21, 2022
@Seldaek
Copy link
Member

Seldaek commented Jan 21, 2022

Makes sense 👍🏻

@johnstevenson johnstevenson deleted the selfupdate branch January 21, 2022 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants