Take solutionName question out from Question constructor to avoid Question instance always has solutionName question
Move answer validation code from Question to Validator so that it can run validation not only Answers but also input parameters
Add checking code if input parameter already has values for below parameters and if it has, don't ask again.
solutionName
subscriptionId
location
username
password.
Note: other parameters have either default values or get values from different source without asking questions to the user.
Don't call UI close() until the end of the program. close() unregisters event listener and hence it could cause a prompt waiting an event without listeners and hang.
We can do code refactoring in the future.
This change keeps the current code structure and most of logic to minimize the risk and although it looks pretty big change, lots of them are white spaces or moving the existing code to different location.
Description and Motivation
This is the fix for issue - https://github.com/Azure/pcs-cli/issues/444
Take solutionName question out from Question constructor to avoid Question instance always has solutionName question
Move answer validation code from Question to Validator so that it can run validation not only Answers but also input parameters
Add checking code if input parameter already has values for below parameters and if it has, don't ask again.
Don't call UI close() until the end of the program. close() unregisters event listener and hence it could cause a prompt waiting an event without listeners and hang.
We can do code refactoring in the future.
This change keeps the current code structure and most of logic to minimize the risk and although it looks pretty big change, lots of them are white spaces or moving the existing code to different location.
Change type
Checklist:
This change is