Fixes for log/output streams

This commit is contained in:
Mislav Marohnić 2021-08-17 13:04:55 +02:00
parent c9c1ff8dac
commit b47686163a
2 changed files with 3 additions and 3 deletions

View file

@ -78,7 +78,7 @@ func Logs(tail bool, codespaceName string) error {
go func() {
scanner := bufio.NewScanner(stdout)
for scanner.Scan() {
log.Println(scanner.Text())
fmt.Println(scanner.Text())
}
if err := scanner.Err(); err != nil {

View file

@ -56,12 +56,12 @@ func makeSSHArgs(port int, dst, cmd string) ([]string, []string) {
return cmdArgs, connArgs
}
func ConnectToTunnel(ctx context.Context, port int, destination string, usingCustomPort bool) <-chan error {
func ConnectToTunnel(ctx context.Context, log logger, port int, destination string, usingCustomPort bool) <-chan error {
connClosed := make(chan error)
args, connArgs := makeSSHArgs(port, destination, "")
if usingCustomPort {
fmt.Println("Connection Details: ssh " + destination + " " + strings.Join(connArgs, " "))
log.Println("Connection Details: ssh " + destination + " " + strings.Join(connArgs, " "))
}
cmd := exec.CommandContext(ctx, "ssh", args...)