aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/repl.cc
diff options
context:
space:
mode:
authorGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-10-16 20:39:19 +0200
committerGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-10-16 20:39:19 +0200
commit3f9f6ae12712b366c038f21de99c8ede6c805be9 (patch)
treef2510a23941efd48c102580fc945107c5cb32e12 /src/libcmd/repl.cc
parent96f2dd99d39da61706895b05ed864558679fac79 (diff)
parent3093bd3a855b8fa1f572fd5a33c1971adf5e3e08 (diff)
Merge remote-tracking branch 'origin/master' into coerce-string
Diffstat (limited to 'src/libcmd/repl.cc')
-rw-r--r--src/libcmd/repl.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index a8de6b80b..4a89f3e28 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
@@ -1046,7 +1050,7 @@ struct CmdRepl : InstallablesCommand
evalSettings.pureEval = false;
}
- void prepare()
+ void prepare() override
{
if (!settings.isExperimentalFeatureEnabled(Xp::ReplFlake) && !(file) && this->_installables.size() >= 1) {
warn("future versions of Nix will require using `--file` to load a file");