aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2022-09-21 13:50:49 +0200
committerGitHub <noreply@github.com>2022-09-21 13:50:49 +0200
commitf704c2720f136a6bb73a2e91d4a85e0e9a42ff6f (patch)
treeae1f37fcd2ba5a82237094b60cd8bf78d56c315a /src
parent9dadb5481cdf848c409e6a7e4953acf4861923a5 (diff)
parentd234d01f010e99c1519b849dd50a502a8af7ede1 (diff)
Merge pull request #7070 from alyssais/repl-history
nix repl: warn if creating dir for history fails
Diffstat (limited to 'src')
-rw-r--r--src/libcmd/repl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index 150bd42ac..61c05050f 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -242,7 +242,11 @@ void NixRepl::mainLoop()
// Allow nix-repl specific settings in .inputrc
rl_readline_name = "nix-repl";
- createDirs(dirOf(historyFile));
+ try {
+ createDirs(dirOf(historyFile));
+ } catch (SysError & e) {
+ logWarning(e.info());
+ }
#ifndef READLINE
el_hist_size = 1000;
#endif