Skip to content

Unmute stdout after prompter execution #1647

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

Merged
merged 1 commit into from
Mar 28, 2016

Conversation

rosen-vladimirov
Copy link
Contributor

In order to prevent double printing of stdout data, CLI mutes the stdout. However this is done in prompter constructor, so every class, that depends on the prompter, automatically mutes the stdout.
Basically CLI mutes the stdout on almost all commands. This causes issues when tns plugin add command is used and the plugin wants to prompt the user for something on postinstall.
Fix this by calling mute exactly before prompting the user and calling unmute immediately after user sends his answer.

Fixes #1610

@rosen-vladimirov rosen-vladimirov self-assigned this Mar 27, 2016
@rosen-vladimirov rosen-vladimirov added this to the 1.7.1 milestone Mar 27, 2016
@Mitko-Kerezov
Copy link
Contributor

Nice fix

In order to prevent double printing of stdout data, CLI mutes the stdout. However this is done in prompter constructor, so every class, that depends on the prompter, automatically mutes the stdout.
Basically CLI mutes the stdout on almost all commands. This causes issues when `tns plugin add` command is used and the plugin wants to prompt the user for something on postinstall.
Fix this by calling mute exactly before prompting the user and calling unmute immediately after user sends his answer.
@rosen-vladimirov rosen-vladimirov force-pushed the vladimirov/fix-prompter-mute branch from 6ce960e to 84f4c8e Compare March 28, 2016 05:55
@rosen-vladimirov rosen-vladimirov merged commit 5b5a555 into release Mar 28, 2016
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-prompter-mute branch March 28, 2016 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants