Skip to content
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

REPL history issue #1574

Closed
indutny opened this issue May 1, 2015 · 2 comments
Closed

REPL history issue #1574

indutny opened this issue May 1, 2015 · 2 comments
Labels
repl Issues and PRs related to the REPL subsystem.

Comments

@indutny
Copy link
Member

indutny commented May 1, 2015

=== release test-repl-timeout-throw ===
Path: parallel/test-repl-timeout-throw
>
var throws = 0;process.on("exit",function(){console.log(throws)});function thrower(){console.log("THROW",throws++);XXX};setTimeout(thrower);""
node.js:135
              throw err;
                    ^
Error: Could not parse history data in /Users/indutny/.iojs/.repl_history.
    at onread (internal/repl.js:103:13)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:382:3)

assert.js:88
  throw new assert.AssertionError({
        ^
AssertionError: false == true
    at ChildProcess.<anonymous> (/Users/indutny/Code/indutny/node/test/parallel/test-repl-timeout-throw.js:52:3)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:169:7)
    at maybeClose (child_process.js:953:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1020:5)

The history file contains undefined for some reason.

cc @chrisdickinson

@indutny
Copy link
Member Author

indutny commented May 1, 2015

I have a fix, will push a PR in a moment.

indutny added a commit to indutny/io.js that referenced this issue May 1, 2015
When running in non-TTY mode - the `repl.history` is `undefined` and
is not actually populated. Saving it will result in a crashes of
subsequent repl runs.

Fix: nodejs#1574
@indutny
Copy link
Member Author

indutny commented May 1, 2015

Should be fixed by #1575

@brendanashworth brendanashworth added the repl Issues and PRs related to the REPL subsystem. label May 1, 2015
indutny added a commit that referenced this issue May 2, 2015
When running in non-TTY mode - the `repl.history` is `undefined` and
is not actually populated. Saving it will result in a crashes of
subsequent repl runs.

Fix: #1574
PR-URL: #1575
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
@indutny indutny closed this as completed May 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants