From d07db3750c2db7c964678ada6df94f671512613e Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 14 Jun 2015 15:24:25 -0500 Subject: [PATCH] preserve directory-naming behavior of `raco pollen clone` --- command.rkt | 4 ++-- raco.rkt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command.rkt b/command.rkt index ad4fc5e..e220254 100644 --- a/command.rkt +++ b/command.rkt @@ -61,10 +61,10 @@ publish [dir] [dest] copy project in dir to dest without source files (start-server))))) -(define (handle-publish directory rest-args) +(define (handle-publish directory rest-args arg-command-name) (define target-path (or (and rest-args (not (null? rest-args)) (path->complete-path (string->path (car rest-args)))) - (build-path (find-system-path 'desk-dir) (string->path world:publish-directory-name)))) + (build-path (find-system-path 'desk-dir) (string->path (if (equal? arg-command-name "clone") "clone" world:publish-directory-name))))) `(begin (require racket/file pollen/file racket/list) diff --git a/raco.rkt b/raco.rkt index cfdf3ec..054f2f9 100644 --- a/raco.rkt +++ b/raco.rkt @@ -35,7 +35,7 @@ [(#f "help") (handle-help)] [("start") (handle-start (path->directory-path first-arg-or-current-dir) port-arg)] [("render") (handle-render (cons first-arg-or-current-dir (map very-nice-path (cdr (vector->list (current-command-line-arguments))))))] - [("clone" "publish") (handle-publish first-arg-or-current-dir rest-args)] + [("clone" "publish") (handle-publish first-arg-or-current-dir rest-args arg-command-name)] [else (handle-else arg-command-name)])))) (module+ main