merged branch kherge/2.2 (PR #7428)

This PR was merged into the 2.2 branch.

Commits
-------

633c051 Fixed invalid file path for hiddeninput.exe on Windows.

Discussion
----------

[2.2] [Console] Fix "The system cannot find the path specified." on Windows for askHiddenResponse().

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none available
| License       | MIT
| Doc PR        | n/a
This commit is contained in:
Fabien Potencier 2013-03-19 23:06:41 +01:00
commit 6c531c132b

View File

@ -230,11 +230,11 @@ class DialogHelper extends Helper
public function askHiddenResponse(OutputInterface $output, $question, $fallback = true)
{
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$exe = __DIR__ . '/../../Resources/bin/hiddeninput.exe';
$exe = __DIR__ . '/../Resources/bin/hiddeninput.exe';
// handle code running from a phar
if ('phar:' === substr(__FILE__, 0, 5)) {
$tmpExe = sys_get_temp_dir() . '/../../Resources/bin/hiddeninput.exe';
$tmpExe = sys_get_temp_dir() . '/hiddeninput.exe';
copy($exe, $tmpExe);
$exe = $tmpExe;
}