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

Text not in answers #1

Open
derBingle opened this issue Apr 27, 2017 · 4 comments
Open

Text not in answers #1

derBingle opened this issue Apr 27, 2017 · 4 comments
Labels

Comments

@derBingle
Copy link

derBingle commented Apr 27, 2017

Using the enquirer example, I'm not having any luck.

The prompt says received, but the text is not in answers.bio, as seen below:

$  node test.js
?  Please write a short bio of at least 3 lines. Received
{ bio: '' }

Possibly relevant details...

  • node --version = 7.7.2
  • $EDITOR = vim 8.0
  • macOS 10.12 Sierra

Edit:

Just testing (because I need to use it, haha), just found that this bug is true when as a standalone prompt or with enquirer.

@lukebatchelor
Copy link

I'm also having issues. I'm getting an explicit null thought, not an empty string.

  • node --version v8.4.0
  • $EDITOR vim 7.4.944
  • mac 10.11.4

@alexbakerdev
Copy link

alexbakerdev commented Oct 10, 2017

I think I've found the issue:

https://github.com/enquirer/prompt-editor/blob/master/index.js#L83

There is no argument passed to submitAnswer, passing it this.answer seems to be giving me expected output.

Its using an older version of prompt-base, here are the relevant lines for submitAnswer:
https://github.com/enquirer/prompt-base/blob/b5f220824d6fbd81ab1b96a9cf47a9ea052427f3/index.js#L245

Not really sure how we should resolve this

@doowb
Copy link
Member

doowb commented Oct 11, 2017

Thanks @Xanderite for tracking this down.

Looks like this prompt needs to be updated to the latest prompt-base and conventions. When we (or anyone else through a PR 😉 ) update it, it should fix this issue.

@jonschlinkert
Copy link
Member

@Xanderite did you want to submit a pr?

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

No branches or pull requests

5 participants