about summary refs log tree commit diff
path: root/src/download-via-ssh/download-via-ssh.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/download-via-ssh/download-via-ssh.cc')
-rw-r--r--src/download-via-ssh/download-via-ssh.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/download-via-ssh/download-via-ssh.cc b/src/download-via-ssh/download-via-ssh.cc
index ac0f5826dd28..3f6f07f87d8b 100644
--- a/src/download-via-ssh/download-via-ssh.cc
+++ b/src/download-via-ssh/download-via-ssh.cc
@@ -94,11 +94,13 @@ static void query(std::pair<FdSink, FdSource> & pipes)
 int main(int argc, char * * argv)
 {
     return handleExceptions(argv[0], [&]() {
-        initNix();
-
         if (argc < 2)
             throw UsageError("download-via-ssh requires an argument");
 
+        initNix();
+
+        settings.update();
+
         if (settings.sshSubstituterHosts.empty())
             return;