aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/repl.cc
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2024-05-23 10:48:38 +0000
committerGerrit Code Review <gerrit@lix-systems>2024-05-23 10:48:38 +0000
commit79121e0c44d74de6f2f2841770d31090a6ea3c6b (patch)
tree79f2aaa191def12bdcf04878e70fb04b1b9faaed /src/libcmd/repl.cc
parent829521b91a5198776253071d2623d9028edb3d0a (diff)
parentd8bc3bfb6d6618f8b6b0669cb5051f85192e5978 (diff)
Merge "repl: do not crash when tab-completing import errors" into main
Diffstat (limited to 'src/libcmd/repl.cc')
-rw-r--r--src/libcmd/repl.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index 89691d33a..46b6d57ed 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -376,6 +376,9 @@ StringSet NixRepl::completePrefix(const std::string & prefix)
// Quietly ignore evaluation errors.
} catch (BadURL & e) {
// Quietly ignore BadURL flake-related errors.
+ } catch (SysError & e) {
+ // Quietly ignore system errors which can for example be raised by
+ // a non-existent file being `import`-ed.
}
}