mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
Don't retry on "unsupported protocol" error
When encountering an unsupported protocol, there's no need to retry.
Chances are, it won't suddenly be supported between retry attempts;
error instead. Otherwise, you see something like the following:
$ nix-env -i -f git://git@github.com/foo/bar
warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 335 ms
warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 604 ms
warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 1340 ms
warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 2685 ms
With this change, you now see:
$ nix-env -i -f git://git@github.com/foo/bar
error: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1)
(cherry picked from commit c976cb0b8a
)
Signed-off-by: Domen Kožar <domen@dev.si>
This commit is contained in:
parent
e914cfb06f
commit
7fee49ef37
1 changed files with 1 additions and 0 deletions
|
@ -391,6 +391,7 @@ struct CurlDownloader : public Downloader
|
||||||
case CURLE_SSL_CACERT_BADFILE:
|
case CURLE_SSL_CACERT_BADFILE:
|
||||||
case CURLE_TOO_MANY_REDIRECTS:
|
case CURLE_TOO_MANY_REDIRECTS:
|
||||||
case CURLE_WRITE_ERROR:
|
case CURLE_WRITE_ERROR:
|
||||||
|
case CURLE_UNSUPPORTED_PROTOCOL:
|
||||||
err = Misc;
|
err = Misc;
|
||||||
break;
|
break;
|
||||||
default: // Shut up warnings
|
default: // Shut up warnings
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue