Skip to content

[Process] ProcessTest::testTTYCommand fails on macOS in non-interactive shells #38946

Closed
@derrabus

Description

@derrabus

Symfony version(s) affected: 4.4-dev

Description
When running the Process test suite on macOS in a non-interactive shell, two tests fail with the following error message.

TTY mode requires /dev/tty to be read/writable.

This is for instance the case on GitLab's CI or when running the tests with PhpStorm.

How to reproduce
Run the Process test suite in PhpStorm.

Additional context
Discovered while working on #38620.

https://github.com/symfony/symfony/pull/38620/checks?check_run_id=1338904496#step:8:1025

There were 2 errors:

1) Symfony\Component\Process\Tests\ProcessTest::testTTYCommand
Symfony\Component\Process\Exception\RuntimeException: TTY mode requires /dev/tty to be read/writable.

/Users/runner/work/symfony/symfony/src/Symfony/Component/Process/Process.php:1075
/Users/runner/work/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessTest.php:480

2) Symfony\Component\Process\Tests\ProcessTest::testTTYCommandExitCode
Symfony\Component\Process\Exception\RuntimeException: TTY mode requires /dev/tty to be read/writable.

/Users/runner/work/symfony/symfony/src/Symfony/Component/Process/Process.php:1075
/Users/runner/work/symfony/symfony/src/Symfony/Component/Process/Tests/ProcessTest.php:495

Bildschirmfoto 2020-11-01 um 18 40 55

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions