Repository navigation
Cannot disable REPL history on Windows by setting NODE_REPL_HISTORY_FILE to blank string #4522
Description
Activity
- ghost changed the title
[-]Attempting to NODE_REPL_HISTORY_FILE on Windows caused filesystem corruption[/-][+]Attempting to disable NODE_REPL_HISTORY_FILE on Windows caused filesystem corruption[/+]on Jan 3, 2016 - addedwindowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
on Jan 3, 2016 - ghost changed the title
[-]Attempting to disable NODE_REPL_HISTORY_FILE on Windows caused filesystem corruption[/-][+]Cannot disable REPL on Windows by setting NODE_REPL_HISTORY_FILE to blank string[/+]on Jan 3, 2016 - ghost changed the title
[-]Cannot disable REPL on Windows by setting NODE_REPL_HISTORY_FILE to blank string[/-][+]Cannot disable REPL history on Windows by setting NODE_REPL_HISTORY_FILE to blank string[/+]on Jan 3, 2016 - addedreplIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.
on Jan 4, 2016 Sorry for the trouble you are having. On which version of node are you seeing this issue?
I'll try to look at this tomorrow.
What's weird about this is that we aren't opening
process.env.NODE_REPL_HISTORY_FILEanymore. We simply callfs.readFileSyncon it. We are now usingprocess.env.NODE_REPL_HISTORYfor the file path. I did notice that it is not being trimmed though, so I went ahead and submitted a PR to fix that.I was able to set the environment variable by opening an Admin command prompt and running:
SETX NODE_REPL_HISTORY_FILE "" /MWhen I checked the Windows System Environment Variable dialog, I could see it there as well.
However, Node.js still creates a history file in my user profile when I open a new command prompt and run the REPL.
@waynebloss What's
process.envsay when you do this?@waynebloss So the issue here is seeing an "empty" ENV variable on windows? That could be an issue in libuv or something.
@waynebloss are you still having this problem? it may have been fixed in v5.5.0
@waynebloss the commit in question has been backported to the staging branch for LTS. You should likely see it land in LTS in the next 2 weeks
Closing as this was released in v4.3.1. Thanks for reporting @waynebloss! Please let us know if you have any more issues.
I attempted to set
NODE_REPL_HISTORY_FILEto a blank string as a Windows System Environment Variable, but the dialog would not allow me to enter a blank string as a value, so I entered a space figuring that Node.js would probably trim the string before using it.However, when I ran Node again, it instead created a file named
(a blank space) that I cannot delete or move now. Anytime I try to delete the file, Explorer acts like I'm trying to delete my whole user profile.