mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-22 07:59:22 +03:00
wait for stdout to finish flushing before exiting
XX probably a better way to do this?
This commit is contained in:
parent
ef0724dc90
commit
d2d18514f1
@ -7,12 +7,12 @@ term =
|
||||
.on \data -> process.stdout.write it
|
||||
|
||||
term.pipe (new stream-snitch /dojo> /g).on \match ->
|
||||
console.log "\n\n---\nnode: got dojo!\n---"
|
||||
set-timeout -> process.exit 0 # should probably test further
|
||||
console.log "\n\n---\nnode: got dojo!\n---\n\n"
|
||||
set-timeout (-> process.exit 0), 1000 # should probably test further
|
||||
|
||||
term.pipe (new stream-snitch /ford: /g).on \match ->
|
||||
console.log "\n\n---\nnode: detected error\n---"
|
||||
set-timeout -> process.exit 1
|
||||
console.log "\n\n---\nnode: detected error\n---\n\n"
|
||||
set-timeout (-> process.exit 1), 1000
|
||||
|
||||
set-timeout ...
|
||||
-> console.log "\n\n---\nnode: timed out after 5 min\n---"
|
||||
|
Loading…
Reference in New Issue
Block a user