Skip to content

Won't capture empty response to prompt on Windows #6

@programmarchy

Description

@programmarchy

The following works on Mac, but not Windows:

var prompt = require('cli-prompt')

prompt('press enter', function (val) {
    console.log('you pressed enter')
})

If you enter a space, or any other character, before hitting enter, then Windows does capture the response. Something to do with handling line returns differently on Mac vs. Win?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions