diff --git a/lib/roles/device/plugins/shell.js b/lib/roles/device/plugins/shell.js index bc863374..8804ba35 100644 --- a/lib/roles/device/plugins/shell.js +++ b/lib/roles/device/plugins/shell.js @@ -42,7 +42,7 @@ module.exports = syrup.serial() function endListener() { push.send([ channel - , reply.okay() + , reply.okay(null) ]) resolver.resolve() } @@ -55,6 +55,8 @@ module.exports = syrup.serial() stream.end() } + stream.setEncoding('utf8') + stream.on('readable', readableListener) stream.on('end', endListener) stream.on('error', errorListener) diff --git a/lib/wire/util.js b/lib/wire/util.js index e287913a..da6a0782 100644 --- a/lib/wire/util.js +++ b/lib/wire/util.js @@ -45,7 +45,7 @@ var wireutil = { source , seq++ , true - , data || 'success' + , data === null ? null : (data || 'success') , body ? JSON.stringify(body) : null )) }