about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorCole Helbling <cole.e.helbling@outlook.com>2020-04-04T19·27-0700
committerEelco Dolstra <edolstra@gmail.com>2020-04-10T08·39+0200
commit7fee49ef3719e7359b1b317a5b5a2bf0b4ecc3df (patch)
treeb43220c935db543dcf2033cdcac8279b45d7fc5d /src/libexpr/eval.cc
parente914cfb06fd64710cb6b030b5b2c8e222745c7fb (diff)
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 c976cb0b8ab5d0f2c4ab8c9826fc7db56e2f1b3e)
Signed-off-by: Domen Kožar <domen@dev.si>
Diffstat (limited to 'src/libexpr/eval.cc')
0 files changed, 0 insertions, 0 deletions