mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-20 14:13:08 +00:00
Auto-merge for PR #605 via VersionBot
Handle incorrectly parsed env vars from docker inspect
This commit is contained in:
commit
caca29f3a0
@ -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!
|
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
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
|
## 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]
|
* 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]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "resin-supervisor",
|
"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.",
|
"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",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -4,5 +4,9 @@ exports.envArrayToObject = (env) ->
|
|||||||
# env is an array of strings that say 'key=value'
|
# env is an array of strings that say 'key=value'
|
||||||
toPair = (keyVal) ->
|
toPair = (keyVal) ->
|
||||||
m = keyVal.match(/^([^=]+)=(.*)$/)
|
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..]
|
return m[1..]
|
||||||
_.fromPairs(_.map(env, toPair))
|
_(env).map(toPair).filter(([_, v]) -> v?).fromPairs().value()
|
||||||
|
Loading…
Reference in New Issue
Block a user