mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-18 17:00:25 +00:00
Use promise API
This commit is contained in:
parent
604a05a21a
commit
29f5c9b7e0
@ -100,14 +100,15 @@ exports.start = start = (app) ->
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
.then ->
|
.then ->
|
||||||
container.attach {stream: true, stdout: true, stderr: true, tty: true}, (err, stream) ->
|
container.attachAsync({ stream: true, stdout: true, stderr: true, tty: true })
|
||||||
es.pipeline(
|
.then (stream) ->
|
||||||
stream
|
es.pipeline(
|
||||||
es.split()
|
stream
|
||||||
# Remove color escape sequences
|
es.split()
|
||||||
es.mapSync((s) -> s.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''))
|
# Remove color escape sequences
|
||||||
es.mapSync(publish)
|
es.mapSync((s) -> s.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''))
|
||||||
)
|
es.mapSync(publish)
|
||||||
|
)
|
||||||
.tap ->
|
.tap ->
|
||||||
console.log('Started container:', app.imageId)
|
console.log('Started container:', app.imageId)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user