diff --git a/racket/collects/raco/raco.rkt b/racket/collects/raco/raco.rkt index e972272936..c5df39166f 100644 --- a/racket/collects/raco/raco.rkt +++ b/racket/collects/raco/raco.rkt @@ -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 ' for help on a command.") (newline) - (exit (if show-all? 0 1))) + (done (if show-all? 0 1)))