mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-11 17:19:05 +00:00
Use watch
to keepalive stdout while installing.
This commit is contained in:
@@ -63,3 +63,15 @@ make_fake_iojs() {
|
||||
return 3
|
||||
}
|
||||
}
|
||||
|
||||
watch() {
|
||||
$@ &
|
||||
local JOB
|
||||
JOB=$!
|
||||
while true; do sleep 15; echo '* ping *'; done &
|
||||
wait $JOB;
|
||||
local EXIT_CODE
|
||||
EXIT_CODE=$?
|
||||
kill %2;
|
||||
return $EXIT_CODE
|
||||
}
|
||||
|
Reference in New Issue
Block a user