typed: reorder operations when running spin scripts

For some reason it was getting stuck on larger spin outputs
This commit is contained in:
Sam Caldwell 2022-06-01 14:36:56 -04:00
parent e42460b5e6
commit 3bdace6535
1 changed files with 1 additions and 2 deletions

View File

@ -897,10 +897,9 @@ Examples:
(define (run-script cmd args)
(match-define (list stdo stdin pid stderr ctrl)
(apply process* cmd args))
(ctrl 'wait)
(define script-completed? (equal? (ctrl 'status) 'done-ok))
(define script-output (port->string stdo))
(define script-err (port->string stderr))
(define script-completed? (equal? (ctrl 'status) 'done-ok))
(close-output-port stdin)
(values script-completed? script-output script-err))