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

process: add undefined check for query of input() #2

Merged
merged 5 commits into from
Apr 6, 2021
Merged

process: add undefined check for query of input() #2

merged 5 commits into from
Apr 6, 2021

Conversation

anirudhgiri
Copy link

Makes nodejs#37925 work as intended.

If process.input is called without any arguments, "undefined" is printed to stdout because the query parameter was undefined for rl.question.

Adding a check to see if args[0] === undefined and setting it to an empty string if true fixes the issue.

@Ayase-252
Copy link
Owner

I'm sorry. I have not seen this PR until now. Is it is ready to merge?

@anirudhgiri
Copy link
Author

@Ayase-252 I think so, I have fixed all linting errors but there seems to be one test failing (test-asan/ test-asan(pull_request) but I don't think it has anything to do with the code.

@Ayase-252 Ayase-252 merged commit e4d6c03 into Ayase-252:feature/input-method Apr 6, 2021
@Ayase-252
Copy link
Owner

@anirudhgiri Thanks, I may proceed the feature in few weeks, since I have some questions to clear about those unit tests 😂. . Stay tuned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants