raco setup et al.: fix problem with relative paths that exit a collection
Closes PR 14063
This commit is contained in:
parent
a13aed7420
commit
5eee14032f
|
@ -29,7 +29,12 @@
|
|||
|
||||
(for ([i '([("main.rkt" "racket") (lib "racket/main.rkt")]
|
||||
[("reader.rkt" "scribble") (lib "scribble/reader.rkt")])])
|
||||
(test (cadr i) path->module-path (apply collection-file-path (car i))))
|
||||
(define p (apply collection-file-path (car i)))
|
||||
(test (cadr i) path->module-path p)
|
||||
(let ([out (build-path (let-values ([(base name dir?) (split-path p)])
|
||||
base)
|
||||
"../info.rkt")])
|
||||
(test (simplify-path out) path->module-path out)))
|
||||
(test "a/b" path->module-path "a/b")
|
||||
(test (find-system-path 'temp-dir) path->module-path (find-system-path 'temp-dir))
|
||||
|
||||
|
|
|
@ -27,8 +27,9 @@
|
|||
(if pkg-collect
|
||||
(cons pkg-collect l)
|
||||
l)))
|
||||
(define c-p (apply collection-file-path (car p-l) new-c-l
|
||||
#:fail (lambda (msg) #f)))
|
||||
(define c-p (and (pair? (cdr p-l))
|
||||
(apply collection-file-path (car p-l) new-c-l
|
||||
#:fail (lambda (msg) #f))))
|
||||
(and c-p
|
||||
(equal? c-p simple-p)
|
||||
(make-result new-c-l (car p-l)))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user