Removed rash integration again and backported raco call.
This commit is contained in:
@@ -75,25 +75,19 @@
|
||||
(and (file-exists? path) path))))
|
||||
|
||||
(define (find-raco-executable)
|
||||
;; Prefer the console executable directory reported by the current Racket
|
||||
;; installation. This does not depend on PATH and therefore also works for
|
||||
;; typical Windows installations under Program Files.
|
||||
(define console-bin
|
||||
(with-handlers ([exn:fail? (lambda (_) #f)])
|
||||
(with-handlers ([exn:fail? (λ (_) #f)])
|
||||
(find-console-bin-dir)))
|
||||
(define from-console-bin
|
||||
(existing-raco-in console-bin))
|
||||
|
||||
;; A useful fallback for portable/non-standard installations: raco normally
|
||||
;; lives alongside the currently running racket executable.
|
||||
(define exec-file
|
||||
(with-handlers ([exn:fail? (lambda (_) #f)])
|
||||
(with-handlers ([exn:fail? (λ (_) #f)])
|
||||
(find-system-path 'exec-file)))
|
||||
(define from-exec-dir
|
||||
(and exec-file
|
||||
(existing-raco-in (path-only exec-file))))
|
||||
|
||||
;; PATH is intentionally last; it might refer to a different Racket install.
|
||||
(or from-console-bin
|
||||
from-exec-dir
|
||||
(find-executable-path (raco-executable-name))
|
||||
@@ -103,7 +97,7 @@
|
||||
(unless (list? command)
|
||||
(raise-argument-error 'raco "list?" command))
|
||||
(define arguments
|
||||
(append-map (lambda (item) (command-item->strings 'raco item)) command))
|
||||
(append-map (λ (item) (command-item->strings 'raco item)) command))
|
||||
(when (null? arguments)
|
||||
(error 'raco "empty command"))
|
||||
(define executable (find-raco-executable))
|
||||
|
||||
Reference in New Issue
Block a user