diff --git a/CHANGELOG.md b/CHANGELOG.md index de6936f8..de433c09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to [Semantic Versioning](http://semver.org/). +## v6.8.2 - 2017-11-14 + +* Fix 'cannot read property R_OK of undefined' error in Node >=6 <6.3 #713 [Tim Perry] + ## v6.8.1 - 2017-11-09 * Avoid AmbiguousApplication errors in device register when an id is used #711 [Tim Perry] diff --git a/build/utils/docker.js b/build/utils/docker.js index f10b3327..fb498b0c 100644 --- a/build/utils/docker.js +++ b/build/utils/docker.js @@ -329,7 +329,7 @@ ensureDockerSeemsAccessible = function(options) { var fs; fs = require('mz/fs'); if (options.socketPath != null) { - return fs.access(options.socketPath, fs.constants.R_OK | fs.constants.W_OK)["return"](true)["catch"](function(err) { + return fs.access(options.socketPath, (fs.constants || fs).R_OK | (fs.constants || fs).W_OK)["return"](true)["catch"](function(err) { throw new Error("Docker seems to be unavailable (using socket " + options.socketPath + "). Is it installed, and do you have permission to talk to it?"); }); } else { diff --git a/lib/utils/docker.coffee b/lib/utils/docker.coffee index 340e207d..b22368c8 100644 --- a/lib/utils/docker.coffee +++ b/lib/utils/docker.coffee @@ -341,7 +341,7 @@ ensureDockerSeemsAccessible = (options) -> if options.socketPath? # If we're trying to use a socket, check it exists and we have access to it - fs.access(options.socketPath, fs.constants.R_OK | fs.constants.W_OK) + fs.access(options.socketPath, (fs.constants || fs).R_OK | (fs.constants || fs).W_OK) .return(true) .catch (err) -> throw new Error( diff --git a/package.json b/package.json index 119688ef..58d48af0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "resin-cli", - "version": "6.8.1", + "version": "6.8.2", "description": "The official resin.io CLI tool", "main": "./build/actions/index.js", "homepage": "https://github.com/resin-io/resin-cli",