How to make tty work #2976
Unanswered
jonnitto
asked this question in
Help needed
Replies: 3 comments 1 reply
-
It's no longer possible with v7. tty was removed. As a workaround use Symfony/Process directly: new Process(ssh crontab, tty=>true) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've written a function like this: function tty(string $command): void
{
$command = parse($command);
$host = currentHost();
$connectionString = $host->getConnectionString();
$ssh = ['ssh', '-A', '-tt', $connectionString, $command];
$process = new Process($ssh);
$process->setTimeout(null)->setIdleTimeout(null)->setTty(true);
$process->run();
} This works so far, but I can't make any input, and there's is also the indicator (see screenshot). How I can get rid of this? |
Beta Was this translation helpful? Give feedback.
1 reply
-
+1 This is the only thing holding me back from updating to v7 currently. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on updating my package from v6 to v7. I've some tasks that use
tty
, and I know it was completely removed from v7. These tasks are mainly helpers to edit configuration files directly with deployer, so that the integrator doesn't has to worry about the correct path. For example, how can I makerun('EDITOR={{editor}} crontab -e', ['timeout' => null, 'tty' => true]);
working with v7?Beta Was this translation helpful? Give feedback.
All reactions