diff options
author | Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | 2022-09-21 13:50:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 13:50:49 +0200 |
commit | f704c2720f136a6bb73a2e91d4a85e0e9a42ff6f (patch) | |
tree | ae1f37fcd2ba5a82237094b60cd8bf78d56c315a /src | |
parent | 9dadb5481cdf848c409e6a7e4953acf4861923a5 (diff) | |
parent | d234d01f010e99c1519b849dd50a502a8af7ede1 (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.cc | 6 |
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 |