Auto-merge for PR #605 via VersionBot

Handle incorrectly parsed env vars from docker inspect
This commit is contained in:
resin-io-versionbot[bot] 2018-03-27 09:41:59 +00:00 committed by GitHub
commit caca29f3a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -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]

View File

@ -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",

View File

@ -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()