raco: use executable yield handler before existing
Makes `raco` wait as it should for a GUI tool. Closes PR 14261
This commit is contained in:
parent
a31ee1be64
commit
bfb4af3e84
|
@ -21,6 +21,10 @@
|
|||
(hash-ref hash s)
|
||||
'ambiguous))))))
|
||||
|
||||
(define (done [result 0])
|
||||
((executable-yield-handler) result) ; to enable GUI commands
|
||||
(exit result))
|
||||
|
||||
(let* ([cmdline (vector->list (current-command-line-arguments))]
|
||||
[cmdline (if (and (pair? cmdline)
|
||||
(equal? "help" (car cmdline))
|
||||
|
@ -53,7 +57,7 @@
|
|||
(list->vector (cdr cmdline))]
|
||||
[current-command-name (car tool)])
|
||||
(dynamic-require (cadr tool) #f)
|
||||
(exit))))]
|
||||
(done))))]
|
||||
[(equal? (car cmdline) "help") #t]
|
||||
[else
|
||||
(eprintf "~a: Unrecognized command: ~a\n\n"
|
||||
|
@ -84,4 +88,4 @@
|
|||
(printf "\nSee `raco help' for a complete list of commands."))
|
||||
(printf "\nSee `raco help <command>' for help on a command.")
|
||||
(newline)
|
||||
(exit (if show-all? 0 1)))
|
||||
(done (if show-all? 0 1)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user