mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-22 06:57: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]
|
* Avoid installing npm dependencies twice [Pablo]
|
||||||
* Updated to bluebird 3 [Page]
|
* Updated to bluebird 3 [Page]
|
||||||
* Better parameter handling in PUT /v1/devices/:uuid [Pablo]
|
* Better parameter handling in PUT /v1/devices/:uuid [Pablo]
|
||||||
|
@ -384,6 +384,12 @@ do ->
|
|||||||
exports.getImageEnv = (id) ->
|
exports.getImageEnv = (id) ->
|
||||||
docker.getImage(id).inspectAsync()
|
docker.getImage(id).inspectAsync()
|
||||||
.get('Config').get('Env')
|
.get('Config').get('Env')
|
||||||
|
.then (env) ->
|
||||||
|
# env is an array of strings that say 'key=value'
|
||||||
|
_(env)
|
||||||
|
.invokeMap('split', '=')
|
||||||
|
.fromPairs()
|
||||||
|
.value()
|
||||||
.catch (err) ->
|
.catch (err) ->
|
||||||
console.log('Error getting env from image', err, err.stack)
|
console.log('Error getting env from image', err, err.stack)
|
||||||
return {}
|
return {}
|
||||||
|
Loading…
Reference in New Issue
Block a user