repl: support hidden history file on Windows · nodejs/node@b09bf51 · GitHub
Skip to content

Commit b09bf51

Browse files
bzozevanlucas
authored andcommitted
repl: support hidden history file on Windows
On Windows when REPL history file has the hidden attribute node will fail when trying to open it in 'w' mode. This changes the mode to 'r+'. The file is guaranteed to exists because of earlier open call with 'a+'. Fixes: #5261 PR-URL: #12207 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 7d87edc commit b09bf51

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

lib/internal/repl.js

Lines changed: 10 additions & 1 deletion

test/fixtures/.empty-hidden-repl-history-file

Whitespace-only changes.

test/parallel/test-repl-persistent-history.js

Lines changed: 15 additions & 0 deletions

0 commit comments

Comments
 (0)