Skip to content

Commit

Permalink
🐛 Slight modification to recent fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Anees Iqbal committed Oct 28, 2021
1 parent 88487b9 commit 157c501
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,13 @@ export class NodeSSH {
let code: number | null = null
let signal: string | null = null
channel.on('exit', (code_, signal_) => {
code = code_
signal = signal_ || null
code = code_ ?? null
signal = signal_ ?? null
})
channel.on('close', () => {
resolve({
code: code !== null ? code : null,
signal: signal !== null ? signal : null,
code: code != null ? code : null,
signal: signal != null ? signal : null,
stdout: output.stdout.join('').trim(),
stderr: output.stderr.join('').trim(),
})
Expand Down

0 comments on commit 157c501

Please sign in to comment.