diff --git a/CHANGELOG.md b/CHANGELOG.md index 95c1b132..4299da8e 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/). +## v7.1.21 - 2018-03-27 + +* Handle incorrectly parsed env vars from docker inspect #605 [Cameron Diver] + ## v7.1.20 - 2018-03-22 * Replace the gosuper component with a node module that handles communication with systemd, and stop using an init system in the supervisor container #592 [Pablo Carranza Velez] diff --git a/package.json b/package.json index 1c899078..4db31978 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "resin-supervisor", "description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.", - "version": "7.1.20", + "version": "7.1.21", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/src/lib/conversions.coffee b/src/lib/conversions.coffee index 0c776e2d..fb66e3ff 100644 --- a/src/lib/conversions.coffee +++ b/src/lib/conversions.coffee @@ -4,5 +4,9 @@ exports.envArrayToObject = (env) -> # env is an array of strings that say 'key=value' toPair = (keyVal) -> m = keyVal.match(/^([^=]+)=(.*)$/) + if !m? + console.log("WARNING: Could not correctly parse env var #{keyVal}. " + + 'Please fix this var and recreate the container.') + return null return m[1..] - _.fromPairs(_.map(env, toPair)) + _(env).map(toPair).filter(([_, v]) -> v?).fromPairs().value()