-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node repl crashes when trying to convert old JSON history file to new line separated one #4102
Labels
repl
Issues and PRs related to the REPL subsystem.
Comments
Working on the fix for this right now. |
zeusdeux
added a commit
to zeusdeux/node
that referenced
this issue
Dec 16, 2015
If the deprecated NODE_REPL_HISTORY_FILE is set to default node history file path ($HOME/.node_repl_history) and the file doesn't exist, then node creates the file and then crashes when it tries to parse that file as JSON thinking that it's an older JSON formatted history file. This fixes that bug. This patch also prevents node repl from throwing if the old history file is empty or if $HOME/.node_repl_history is empty.
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this issue
Dec 22, 2015
If the deprecated NODE_REPL_HISTORY_FILE is set to default node history file path ($HOME/.node_repl_history) and the file doesn't exist, then node creates the file and then crashes when it tries to parse that file as JSON thinking that it's an older JSON formatted history file. This fixes that bug. This patch also prevents node repl from throwing if the old history file is empty or if $HOME/.node_repl_history is empty. Fixes: nodejs#4102 PR-URL: nodejs#4108 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this issue
Jan 6, 2016
If the deprecated NODE_REPL_HISTORY_FILE is set to default node history file path ($HOME/.node_repl_history) and the file doesn't exist, then node creates the file and then crashes when it tries to parse that file as JSON thinking that it's an older JSON formatted history file. This fixes that bug. This patch also prevents node repl from throwing if the old history file is empty or if $HOME/.node_repl_history is empty. Fixes: nodejs#4102 PR-URL: nodejs#4108 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins
pushed a commit
that referenced
this issue
Jan 13, 2016
If the deprecated NODE_REPL_HISTORY_FILE is set to default node history file path ($HOME/.node_repl_history) and the file doesn't exist, then node creates the file and then crashes when it tries to parse that file as JSON thinking that it's an older JSON formatted history file. This fixes that bug. This patch also prevents node repl from throwing if the old history file is empty or if $HOME/.node_repl_history is empty. Fixes: #4102 PR-URL: #4108 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins
pushed a commit
that referenced
this issue
Jan 19, 2016
If the deprecated NODE_REPL_HISTORY_FILE is set to default node history file path ($HOME/.node_repl_history) and the file doesn't exist, then node creates the file and then crashes when it tries to parse that file as JSON thinking that it's an older JSON formatted history file. This fixes that bug. This patch also prevents node repl from throwing if the old history file is empty or if $HOME/.node_repl_history is empty. Fixes: #4102 PR-URL: #4108 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
scovetta
pushed a commit
to scovetta/node
that referenced
this issue
Apr 2, 2016
If the deprecated NODE_REPL_HISTORY_FILE is set to default node history file path ($HOME/.node_repl_history) and the file doesn't exist, then node creates the file and then crashes when it tries to parse that file as JSON thinking that it's an older JSON formatted history file. This fixes that bug. This patch also prevents node repl from throwing if the old history file is empty or if $HOME/.node_repl_history is empty. Fixes: nodejs#4102 PR-URL: nodejs#4108 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If
NODE_REPL_HISTORY_FILE
was set as$HOME/.node_repl_history
pre-v3.0 and if it is empty, runningnode
(post-v3.0) throws.Twitter conversation about this between @chrisdickinson, @Fishrock123 and myself is here.
Edit: So, I had
NODE_REPL_HISTORY_FILE
set to$HOME/.node_repl_history
but I didn't have the file. Runningnode
created an empty file and sinceoldHistoryPath
was truthy in the call toonread
ininternal/repl.js
, it tried toJSON.parse
an empty string and threw.The text was updated successfully, but these errors were encountered: