mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-19 00:26:53 +00:00
Fix event-stream usage.
This commit is contained in:
parent
f317927284
commit
5bd4ee7ee6
@ -75,7 +75,9 @@ exports.start = start = (app) ->
|
||||
stream.pipe(JSONStream.parse('error'))
|
||||
.pipe(es.mapSync(reject))
|
||||
else
|
||||
stream.pipe(es.wait((error, text) -> reject(text)))
|
||||
stream.pipe es.wait (error, text) ->
|
||||
if error
|
||||
reject(text)
|
||||
|
||||
stream.on('end', resolve)
|
||||
.then ->
|
||||
|
@ -63,7 +63,9 @@ exports.initialised = currentSupervisor.then (currentSupervisor) ->
|
||||
stream.pipe(JSONStream.parse('error'))
|
||||
.pipe(es.mapSync(reject))
|
||||
else
|
||||
stream.pipe(es.wait((error, text) -> reject(text)))
|
||||
stream.pipe es.wait (error, text) ->
|
||||
if error
|
||||
reject(text)
|
||||
|
||||
stream.on('end', resolve)
|
||||
.then ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user