Commit 7d4ba80
authored
gen_stub: Fix php-parser package download (#20775)
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.1 parent 20f9772 commit 7d4ba80
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5970 | 5970 | | |
5971 | 5971 | | |
5972 | 5972 | | |
5973 | | - | |
| 5973 | + | |
| 5974 | + | |
5974 | 5975 | | |
5975 | | - | |
| 5976 | + | |
5976 | 5977 | | |
5977 | 5978 | | |
5978 | 5979 | | |
| |||
5982 | 5983 | | |
5983 | 5984 | | |
5984 | 5985 | | |
| 5986 | + | |
5985 | 5987 | | |
5986 | 5988 | | |
5987 | 5989 | | |
| |||
0 commit comments