You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot disable REPL history on Windows by setting NODE_REPL_HISTORY_FILE to blank string #4522
I attempted to set NODE_REPL_HISTORY_FILE to 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.
Reactions are currently unavailable
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
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
What's weird about this is that we aren't opening process.env.NODE_REPL_HISTORY_FILE anymore. We simply call fs.readFileSync on it. We are now using process.env.NODE_REPL_HISTORY for the file path. I did notice that it is not being trimmed though, so I went ahead and submitted a PR to fix that.
Activity
[-]Attempting to NODE_REPL_HISTORY_FILE on Windows caused filesystem corruption[/-][+]Attempting to disable NODE_REPL_HISTORY_FILE on Windows caused filesystem corruption[/+][-]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[/+][-]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[/+]evanlucas commentedon Jan 4, 2016
Sorry for the trouble you are having. On which version of node are you seeing this issue?
Fishrock123 commentedon Jan 4, 2016
I'll try to look at this tomorrow.
evanlucas commentedon Jan 5, 2016
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.Fishrock123 commentedon Jan 7, 2016
@waynebloss What's
process.envsay when you do this?Fishrock123 commentedon Jan 7, 2016
@waynebloss So the issue here is seeing an "empty" ENV variable on windows? That could be an issue in libuv or something.
MylesBorins commentedon Jan 28, 2016
@waynebloss are you still having this problem? it may have been fixed in v5.5.0
MylesBorins commentedon Jan 28, 2016
@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
evanlucas commentedon Mar 8, 2016
Closing as this was released in v4.3.1. Thanks for reporting @waynebloss! Please let us know if you have any more issues.