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 ->
|
||||
container.attach {stream: true, stdout: true, stderr: true, tty: true}, (err, stream) ->
|
||||
es.pipeline(
|
||||
stream
|
||||
es.split()
|
||||
# Remove color escape sequences
|
||||
es.mapSync((s) -> s.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''))
|
||||
es.mapSync(publish)
|
||||
)
|
||||
container.attachAsync({ stream: true, stdout: true, stderr: true, tty: true })
|
||||
.then (stream) ->
|
||||
es.pipeline(
|
||||
stream
|
||||
es.split()
|
||||
# Remove color escape sequences
|
||||
es.mapSync((s) -> s.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''))
|
||||
es.mapSync(publish)
|
||||
)
|
||||
.tap ->
|
||||
console.log('Started container:', app.imageId)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user