From 84338a44b2314225a4233dd1907bf1e4c530012a Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Mon, 31 Oct 2016 16:54:55 -0700 Subject: [PATCH] TOOLS-1592 triton CLI *using node 6* fails various commands with MD5 errors Reviewed by: Julien Gilli --- CHANGES.md | 5 +++++ lib/SaferJsonClient.js | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2980f0c..e73b81d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,11 @@ Known issues: ## not yet released +## 4.14.2 + +- TOOLS-1592 First workaround for a possible BadDigestError when using + node v6. + ## 4.14.1 - TOOLS-1587 'triton profile docker-setup' fails when path to 'docker' has diff --git a/lib/SaferJsonClient.js b/lib/SaferJsonClient.js index 64ab172..48da580 100644 --- a/lib/SaferJsonClient.js +++ b/lib/SaferJsonClient.js @@ -204,7 +204,7 @@ SaferJsonClient.prototype.parse = function parse(req, callback) { res.on('data', function onData(chunk) { if (contentMd5Hash) { - contentMd5Hash.update(chunk.toString('utf8')); + contentMd5Hash.update(chunk.toString('utf8'), 'binary'); } if (gz) { diff --git a/package.json b/package.json index 389a83b..dd505b7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "triton", "description": "Joyent Triton CLI and client (https://www.joyent.com/triton)", - "version": "4.14.1", + "version": "4.14.2", "author": "Joyent (joyent.com)", "dependencies": { "assert-plus": "0.2.0",