Closed westonruter closed 10 years ago
@westonruter I've tested it with vagrant 1.4 and no issue came up. I think we can close this.
@jonathanbardo does it now allow a simpler cmd
than what we have right now:
vagrant ssh-config > /tmp/vagrant_ssh_config && ssh -q %pseudotty% -F /tmp/vagrant_ssh_config default %cmd%
For example something like:
vagrant ssh -c %cmd% -- -q %pseudotty%
The old vagrant ssh
didn't seem to like the additional ssh
arguments being supplied after --
as advertised. If this allows both TTY and piped (non-TTY) using just vagrant ssh
then that would be great.
vagrant ssh -c %cmd% -- -q %pseudotty%
This does work without problem.
Does this produce a colorized output?
wp ssh --host=vagrant plugin status
And then does this produce a non-colorized (machine-readable) output?
wp ssh --host=vagrant plugin status | cat -
vagrant ssh -c
now uses OpenSSH under the covers, so it should be able to replace your piping thing above.
vagrant ssh -c %cmd% -- -q %pseudotty% wp ssh --host=vagrant plugin status | cat -
This combination does not produce a machine readable output.
@mitchellh thanks for chiming in! This doesn't seem to be the case, unfortunately.
On my Vagrant 1.3, the following both echo "Non-TTY":
vagrant ssh -c 'if [ -t 1 ]; then echo TTY; else echo Non-TTY; fi' -- -t
vagrant ssh -c 'if [ -t 1 ]; then echo TTY; else echo Non-TTY; fi' -- -T
Whereas on @jonathanbardo's Vagrant 1.4 install, they both echo "TTY".
It seems that while the TTY behavior has changed with the switch to Open SSH, the SSH pseudo-TTY flags -t
/-T
aren't being recognized.
@westonruter Can you report a bug please?
Closing since issue resolved in Vagrant 1.4.1, and old cmd
with vagrant ssh-config
still works regardless.