Skip to content

Commit 89e7d7b

Browse files
alex-peckDanny McCormick
andauthored
Backport logging fix (#12441)
* Fix logging * null check Co-authored-by: Danny McCormick <[email protected]>
1 parent 3f35292 commit 89e7d7b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Tasks/SshV0/ssh2helpers.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,14 @@ export function runCommandOnRemoteMachine(command: string, sshClient: any, optio
8080
defer.resolve('0');
8181
}
8282
}).on('data', (data) => {
83-
console.log(data);
83+
if (data) {
84+
console.log(data.toString('utf8'));
85+
}
8486
}).stderr.on('data', (data) => {
8587
stdErrWritten = true;
8688
tl.debug('stderr = ' + data);
8789
if (data && data.toString().trim() !== '') {
88-
tl.error(data);
90+
tl.error(data.toString('utf8'));
8991
}
9092
});
9193
});

0 commit comments

Comments
 (0)