STDERR: the input device is not a TTY
I’m trying to create a site remotely (via php) ee site create example.com --type=wp, but it’s failing because of STDERR: the input device is not a TTY error. Ref
ee.DEBUG: -----------------------
ee.INFO: Downloading and configuring WordPress.
ee.DEBUG: -----------------------
ee.DEBUG: COMMAND: docker-compose exec --user=root php chown -R www-data: /var/www/
ee.DEBUG: STDERR: the input device is not a TTY
ee.DEBUG: RETURN CODE: 1
ee.DEBUG: -----------------------
ee.DEBUG: -----------------------
ee.DEBUG: COMMAND: docker-compose exec --user='www-data' php wp core download --path=/var/www/htdocs --locale='en_US'
ee.DEBUG: STDERR: the input device is not a TTY
ee.DEBUG: RETURN CODE: 1
ee.DEBUG: -----------------------
ee.ERROR: Unable to download wp core.
ee.DEBUG: -----------------------
@mrrobot47
We need to detect if EasyEngine is running inside tty or not(for example via a ssh connection) and add the -T flag to docker-compose commands.
I’m trying to create a site remotely (via php)
@tareq1988 I'm assuming you might be using something like ssh [email protected] 'ee site create example.com ...'. If that's the case, then until the bug is fixed, you can pass -t flag to ssh. i.e. ssh -t [email protected] 'ee site create example.com ...'.
-t will allocate TTY hence docker will not complain about it.
I'm using phpseclib to create the site remotely from an API and I couldn't yet find a way to pass the -t flag.
When do you guys think will be able push a fix?
@tareq1988 Since this issue is an edge case and not something that everyone would encounter, I'll classify it as a low priority issue; Hence, I won't be able to give you a timeframe for a fix.
If you're interested in following developments on this issue, you can subscribe to this issue.
Currently solved this via export COMPOSE_INTERACTIVE_NO_CLI=1;
Currently solved this via
export COMPOSE_INTERACTIVE_NO_CLI=1;
@tareq1988 can you please share, where have you executed the export command? The path, i mean.
I've used like this export COMPOSE_INTERACTIVE_NO_CLI=1; ee site create example.com --type=wp
Was not able to fix with export COMPOSE_INTERACTIVE_NO_CLI=1; in no way whatsoever . A dirty workaround i've found was: script -q -c "ee site create example.com --type=wp" /dev/null | cat , "tricking" ee to see a tty.
Hi,
There is an approach for this? If not, I would like to contribute for this issue.
I'm getting the same error but I think due to an earlier failure. The site in question was deleted and recreated multiple times for unrelated reasons, then I started getting this error when trying to recreate it. See attached logs and the script that produced the stdout and stderr. I've tried the above workarounds but to no avail. Creating a different site works, or deleting the entire installation and starting over, but I would prefer not to have to do that to fix this one site. The more sites I add the worse that would be.
eeb.zip .