ssh: Add StripCRReader for gocrypto on windows #251

Merged
merged 1 commit into from Nov 22, 2016

Conversation

Projects
None yet
3 participants
Contributor

bz2 commented Nov 17, 2016

Fixes lp:1468752 by removing carriage returns from textual stdin
stream on windows when using gocrypto to communicate with remote
machine.

This is part one of making ssh from windows to a unix machine
more usable. Notably, this doesn't enable the passing of control
codes through to the remote shell, so for instance using a text
editor is still problematic.

QA steps

  • Build juju using this version of utils for windows.
  • Bootstrap with the resultant juju.exe
  • juju switch controller
  • juju.exe ssh 0
  • On remote machine, ls ~
  • See outout from ls and no other kipple.
  • Run other commands as well, note vi somefile is still not usable.
ssh: Add StripCRReader for gocrypto on windows
Fixes lp:1468752 by removing carriage returns from textual stdin
stream on windows when using gocrypto to communicate with remote
machine.

This is part one of making ssh from windows to a unix machine
more usable. Notably, this doesn't enable the passing of control
codes through to the remote shell, so for instance using a text
editor is still problematic.

Personally, I'd make WrapStdin just check runtime.GOOS so that we don't need two files for single line functions, and it means you can test it more easily from any platform. However, I don't think it's a dealbreaker.

Sorry, meant to make the one above an approve, but forgot to set it, and there seems to be no way to change that after the fact.

Contributor

bz2 commented Nov 22, 2016

$$merge$$

Contributor

jujubot commented Nov 22, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils

@jujubot jujubot merged commit 4559f40 into juju:master Nov 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment