Retry download from dist URL #11411
-
Hi all, Is it possible to retry a package download from the dist URL (v2.0.0)? At the moment, if it fails it reverts to the source URL. We're using our own artifact repo for the dist source and sometimes (very rarely!), composer gets a 404 from the dist URL during our build pipeline. It seems temp network related, as other packages in the same install download fine. Re-running composer fixes it. Our pipeline doesn't have external access, so the source is pointless. Is there a way to ignore the source URL completely and retry the dist URL? Alternatively, is there a command to validate all installed packages are downloaded? The added complication is that we didn't get an exit code when composer failed to download from dist & source. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is weird, as composer should be failing if neither dist nor source could be downloaded |
Beta Was this translation helpful? Give feedback.
I think I've found the cause. We don't have git installed on the Docker image we use for builds. Composer v2.0.0 (the one we're using) doesn't throw an exception when git isn't available. So silently fails on git source downloads.
The latest code does though:
I'll arrange for composer to be upgraded and hopefully that'll resolve it!