We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc1c7bb commit a5a3f82Copy full SHA for a5a3f82
stdlib/REPL/src/REPL.jl
@@ -671,10 +671,15 @@ function add_history(hist::REPLHistoryProvider, s::PromptState)
671
# If this doesn't fix it (e.g. when file is deleted), we'll end up rethrowing anyway
672
hist_open_file(hist)
673
end
674
- FileWatching.mkpidlock(hist.file_path * ".pid", stale_age=3) do
+ if isfile(hist.file_path)
675
+ FileWatching.mkpidlock(hist.file_path * ".pid", stale_age=3) do
676
+ print(hist.history_file, entry)
677
+ flush(hist.history_file)
678
+ end
679
+ else # handle eg devnull
680
print(hist.history_file, entry)
681
flush(hist.history_file)
- end
682
683
nothing
684
685
0 commit comments