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 281a039 commit 9b35f92Copy full SHA for 9b35f92
stdlib/REPL/src/REPL.jl
@@ -651,10 +651,15 @@ function add_history(hist::REPLHistoryProvider, s::PromptState)
651
# If this doesn't fix it (e.g. when file is deleted), we'll end up rethrowing anyway
652
hist_open_file(hist)
653
end
654
- FileWatching.mkpidlock(hist.file_path * ".pid", stale_age=3) do
+ if isfile(hist.file_path)
655
+ FileWatching.mkpidlock(hist.file_path * ".pid", stale_age=3) do
656
+ print(hist.history_file, entry)
657
+ flush(hist.history_file)
658
+ end
659
+ else # handle eg devnull
660
print(hist.history_file, entry)
661
flush(hist.history_file)
- end
662
663
nothing
664
665
0 commit comments