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 9a5b7b4 commit cfb73b2Copy full SHA for cfb73b2
stdlib/REPL/src/REPL.jl
@@ -625,10 +625,15 @@ function add_history(hist::REPLHistoryProvider, s::PromptState)
625
# If this doesn't fix it (e.g. when file is deleted), we'll end up rethrowing anyway
626
hist_open_file(hist)
627
end
628
- FileWatching.mkpidlock(hist.file_path * ".pid", stale_age=3) do
+ if isfile(hist.file_path)
629
+ FileWatching.mkpidlock(hist.file_path * ".pid", stale_age=3) do
630
+ print(hist.history_file, entry)
631
+ flush(hist.history_file)
632
+ end
633
+ else # handle eg devnull
634
print(hist.history_file, entry)
635
flush(hist.history_file)
- end
636
637
nothing
638
639
0 commit comments