X Tutup
Skip to content

Commit b476861

Browse files
committed
Fixes for log/output streams
1 parent c9c1ff8 commit b476861

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/ghcs/logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func Logs(tail bool, codespaceName string) error {
7878
go func() {
7979
scanner := bufio.NewScanner(stdout)
8080
for scanner.Scan() {
81-
log.Println(scanner.Text())
81+
fmt.Println(scanner.Text())
8282
}
8383

8484
if err := scanner.Err(); err != nil {

internal/codespaces/ssh.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ func makeSSHArgs(port int, dst, cmd string) ([]string, []string) {
5656
return cmdArgs, connArgs
5757
}
5858

59-
func ConnectToTunnel(ctx context.Context, port int, destination string, usingCustomPort bool) <-chan error {
59+
func ConnectToTunnel(ctx context.Context, log logger, port int, destination string, usingCustomPort bool) <-chan error {
6060
connClosed := make(chan error)
6161
args, connArgs := makeSSHArgs(port, destination, "")
6262

6363
if usingCustomPort {
64-
fmt.Println("Connection Details: ssh " + destination + " " + strings.Join(connArgs, " "))
64+
log.Println("Connection Details: ssh " + destination + " " + strings.Join(connArgs, " "))
6565
}
6666

6767
cmd := exec.CommandContext(ctx, "ssh", args...)

0 commit comments

Comments
 (0)
X Tutup