Skip to content

Conversation

@thg2k
Copy link
Contributor

@thg2k thg2k commented Dec 24, 2025

If the system wgetrc has the content-disposition = on option, the file is actually saved as PHP-Parser-5.0.0.tar.gz, causing a subsequent failure.

Even with content-disposition = off, if for any reason the download file already exists and is corrupted, it won't be overwritten, and a new file such as v5.0.0.tar.gz.1 is saved instead.

We solve both problems by enforcing the name of the downloaded file.

Also, if for any other reason the unpacking should fail, remove the created directory to allow further attempts.

If the system wgetrc has the `content-disposition = on` option, the file is
actually saved as `PHP-Parser-5.0.0.tar.gz`, causing a subsequent failure.

Even with `content-disposition = off`, if for any reason the download file
already exists and is corrupted, it won't be overwritten, and a new file
such as `v5.0.0.tar.gz.1` is saved instead.

We solve both problems by enforcing the name of the downloaded file.

Also, if for any other reason the unpacking should fail, remove the created
directory to allow further attempts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant