Description
(This is my first ever GitHub issue, so let me know if I'm doing anything wrong!)
Symfony version(s) affected: symfony/console ^5.2.3 (latest)
Description
When using the getHiddenResponse method of the QuestionHelper class (which is called when running askQuestion with a hidden question) in a project of which the location has a space in it, it will error out and try to execute the first part of the project location, eg.:
My project is located in 'D:\My Projects\My Cool Project', it will try to execute 'D:\My'.
How to reproduce
Create a php application with the Symfony console component inside of a folder with a space in the name (see example above). Then run askQuestion with a Question object that has hidden set to true.
Possible Solution
Changing this line: $exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
to this: $exe = '"' . __DIR__ . '/../Resources/bin/hiddeninput.exe' . '"';
in Helper\QuestionHelper.php line 405.
This should fix the problem stated above.
Additional context
I found this 'bug' in Laravel 8 on Windows whilst trying to create a console command with a secret input.