Merge pull request #7070 from alyssais/repl-history

nix repl: warn if creating dir for history fails
This commit is contained in:
Théophane Hufschmitt 2022-09-21 13:50:49 +02:00 committed by GitHub
commit f704c2720f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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