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

readline will echo first line of input #7965

Closed
AlexBedley opened this issue Aug 3, 2016 · 3 comments
Closed

readline will echo first line of input #7965

AlexBedley opened this issue Aug 3, 2016 · 3 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. readline Issues and PRs related to the built-in readline module. windows Issues and PRs related to the Windows platform.

Comments

@AlexBedley
Copy link

AlexBedley commented Aug 3, 2016

  • Version: v4.2.1
  • Platform: Windows 8.1 Enterprise (64-bit)
  • Subsystem: readline

Problem: readline will echo the first line it receives (but not any subsequent line)
Minimum Code to Reproduce:

// test.js
const readline = require('readline');

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

rl.question('This is a question?', (answer) => {
  rl.close();
  process.exit(0);
});

Actual Output:

AlexBedley ~/dev/playground
λ node test.js
This is a question?yes
yes

Expected Output:

AlexBedley ~/dev/playground
λ node test.js
This is a question?yes

Notes: This also happens to me when I run the node repl (via node on the command line). The first line is always echoed but subsequent lines are not. This happens to me on cmd and also msysgit. My Windows coworkers can reproduce this (also 4.2.1) although my coworker that uses a Mac can't. When I downgrade my node to 0.10.36 the issue goes away.

@mscdex mscdex added the readline Issues and PRs related to the built-in readline module. label Aug 3, 2016
@addaleax addaleax added the windows Issues and PRs related to the Windows platform. label Aug 3, 2016
@addaleax
Copy link
Member

addaleax commented Aug 4, 2016

/cc @nodejs/platform-windows ?

@jasongin
Copy link
Member

I reproduced the issue with v4.2.1 and confirmed this is fixed as of node v4.2.4 / v5.1.0 by 946fe61

So this issue might be considered a duplicate of #2504 or #2996

@MylesBorins
Copy link
Contributor

closing as it is it is fixed in a more recent release

@addaleax addaleax added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Aug 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. readline Issues and PRs related to the built-in readline module. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

5 participants