mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 22:47:49 +00:00
Fix docker utils getImageEnv by correctly parsing the returned array
This commit is contained in:
parent
a2df8c513a
commit
6feba39948
@ -1,3 +1,4 @@
|
||||
* Fix docker utils getImageEnv by correctly parsing the returned array [Pablo]
|
||||
* Avoid installing npm dependencies twice [Pablo]
|
||||
* Updated to bluebird 3 [Page]
|
||||
* Better parameter handling in PUT /v1/devices/:uuid [Pablo]
|
||||
|
@ -384,6 +384,12 @@ do ->
|
||||
exports.getImageEnv = (id) ->
|
||||
docker.getImage(id).inspectAsync()
|
||||
.get('Config').get('Env')
|
||||
.then (env) ->
|
||||
# env is an array of strings that say 'key=value'
|
||||
_(env)
|
||||
.invokeMap('split', '=')
|
||||
.fromPairs()
|
||||
.value()
|
||||
.catch (err) ->
|
||||
console.log('Error getting env from image', err, err.stack)
|
||||
return {}
|
||||
|
Loading…
Reference in New Issue
Block a user