diff --git a/collects/setup/main.rkt b/collects/setup/main.rkt index bf641edccb..f4cceee2f0 100644 --- a/collects/setup/main.rkt +++ b/collects/setup/main.rkt @@ -24,7 +24,7 @@ ns))) (define-values (short-name long-names raco?) - ;; Load the name modulewithout using .zos, and in its own namespace to + ;; Load the name module without using .zos, and in its own namespace to ;; avoid poluting the cm-managed namespace later (parameterize ([use-compiled-file-paths null] [current-namespace (make-kernel-namespace)]) diff --git a/collects/setup/private/command-name.rkt b/collects/setup/private/command-name.rkt index 4da9c12fa3..33554e056f 100644 --- a/collects/setup/private/command-name.rkt +++ b/collects/setup/private/command-name.rkt @@ -2,28 +2,32 @@ ;; so minimize its dependencies (module command-name '#%kernel - (#%require raco/command-name) + (#%require raco/command-name '#%utils) (#%provide get-names) (define-values (get-names) (lambda () (let-values ([(p) (find-system-path 'run-file)]) - (let-values ([(base name dir?) (split-path p)]) - (if (current-command-name) - (values (format "~a ~a" name (current-command-name)) - (program+command-name)) - ;; Hack for bootstrapping, if the program name is "raco", - ;; then claim to be the "setup" command: - ;; if the program name is "racket", assume that there's a "racket -l setup" - ;; going on in there and also claim to be the "raco setup" command - (if (if (equal? (path->string name) "raco") - #t - (equal? (path->string name) "racket")) - (values "raco setup" - (string-append (regexp-replace* - #rx"racket$" - (format "~a" p) - "raco") - " setup") - #t) - (values (path->string name) p #f)))))))) + (let-values ([(p) (if (eq? (system-type) 'windows) + (path-replace-suffix p #"") + p)]) + (let-values ([(base name dir?) (split-path p)]) + (if (current-command-name) + (values (format "~a ~a" name (current-command-name)) + (program+command-name)) + ;; Hack for bootstrapping, if the program name is "raco", + ;; then claim to be the "setup" command: + ;; if the program name is "racket", assume that there's a "racket -l setup" + ;; going on in there and also claim to be the "raco setup" command + (if (if (equal? (path->string name) "raco") + #t + (equal? (path->string name) "racket")) + (values "raco setup" + (string-append (regexp-replace* + #rx"racket$" + (format "~a" p) + "raco") + " setup") + #t) + (values (path->string name) p #f))))))))) +