Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Check inquirer function expectations #189

Closed
RobinKnipe opened this issue Oct 8, 2020 · 2 comments
Closed

Check inquirer function expectations #189

RobinKnipe opened this issue Oct 8, 2020 · 2 comments

Comments

@RobinKnipe
Copy link
Contributor

const answer = p.filter ? p.filter(value) : value;

The line above (and others in the codebase) don't fully honour the inquirer function parameters. Most of the "question" functions have the form (input, answers) => .... See the docs here for more details.

@crutchcorn
Copy link
Member

I'm not entirely sure I understand. What does this impact? Could you demonstrate what a "fix" would be?

@RobinKnipe
Copy link
Contributor Author

RobinKnipe commented Oct 9, 2020

Fixed by the PR #190 - basically, it just makes sure the filter and validate functions are called with the user's input and the hash of the other completed answers. This allows filtering and validation to consider all the responses as part of their evaluation (not just the response to the current question).

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

No branches or pull requests

2 participants