terminus
terminus copied to clipboard
Running remote:wp fails to generate output for interactive terminal
Expected behavior
When running the remote:wp
I should be able to see the output from an interactive terminal:
$ terminus remote:wp --quiet example.dev -- core version
5.0.2
Actual behavior
There is no output even though the ssh
command does result in an 0
exit code:
However if I disable the interactive shell then I do get the expected output:
If I dump the $cmd
in LocalMachineHelper
to obtain the underlying ssh
command, I can run that directly from the command line as well.
There seems to be some problem with piping or buffering the output when in TTY mode.
Steps to reproduce the behavior
I'm running Terminus 1.9.0 on MacOS Mojave. I've experienced this issue in both PHP 7.1 and 7.3.
------------------------- -------------------------------------------------------------
PHP binary /Users/westonruter/homebrew/Cellar/php/7.3.0/bin/php
PHP version 7.3.0
php.ini used /Users/westonruter/homebrew/etc/php/7.3/php.ini
Terminus project config
Terminus root dir /Users/westonruter/terminus
Terminus version 1.9.0
Operating system Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018;
root:xnu-4903.231.4~2/RELEASE_X86_64
------------------------- -------------------------------------------------------------
Can't reproduce this. Tried today's HEAD of master and the tag 1.9.0 on php 7.2 and php 7.3 on MacOS Mojave (four permutations).
I've seen similar reports for Windows systems, though.
I haven't been able to reproduce this personally, but with customers on Windows and Mac who have had similar issues, they updated some of Terminus's dependencies via Composer and that fixed the issue. I just recommended that another customer do this, and hopefully they will follow-up with what they updated if it does fix it.
Have they provided any follow-up info?
In case this helps anyone else reproduce and fix this issue... I was encountering the same issue when using Drush through Terminus on an Alpine Linux docker image we were using on our CI system.
The fix for us was installing the php7-posix package. Once that was in place, the output started showing as expected.
Thank you @nplowman !! We also ran into this
I wonder if php7-posix should be added to terminus as a composer dependency so it properly gets reported when it's missing?