Skip to content

[Console] always use stty when possible to ask hidden questions #37469

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
Jul 3, 2020

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Jul 1, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #36565, replaces #36590
License MIT
Doc PR -

The current code doesn't make much sense: we check hasSttyAvailable(), and if the answer is false, we still use stty directly.

This PR relies on stream_isatty and equivalent fallback checks to decide if the password can be hidden or not.

Best reviewed ignoring whitespaces.

@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Jul 1, 2020
@nicolas-grekas nicolas-grekas changed the title [Console] always use ssty when possible to ask hidden questions [Console] always use stty when possible to ask hidden questions Jul 1, 2020
@nicolas-grekas nicolas-grekas force-pushed the console-stty branch 2 times, most recently from 1dbab2f to 339bfc8 Compare July 1, 2020 13:36
@nicolas-grekas nicolas-grekas merged commit fec2331 into symfony:4.4 Jul 3, 2020
@nicolas-grekas nicolas-grekas deleted the console-stty branch July 6, 2020 15:03
This was referenced Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants