pkg: allow path string as `#:scope' argument
This commit is contained in:
parent
0ecd04787a
commit
c0af1fe4bd
|
@ -21,9 +21,12 @@ building blocks and local-database support.
|
|||
The @racketmodname[pkg] module provides a programmatic interface
|
||||
to the @exec{raco pkg} sub-subcommands.
|
||||
|
||||
Each-long form option of the command-line interface is keyword
|
||||
Each-long form option of the command-line interface is a keyword
|
||||
argument to the functions described below. An argument corresponding to @DFlag{type}, @DFlag{deps},
|
||||
@DFlag{format}, or @DFlag{scope} accepts its argument as a symbol. All other options
|
||||
@DFlag{format}, or @DFlag{scope} accepts its argument as a symbol.
|
||||
An argument corresponding to @DFlag{scope} is also allowed to be a path string,
|
||||
as would be provided to @DFlag{scope-dir}.
|
||||
Options without argument correspond to keyword arguments that
|
||||
accept booleans, where @racket[#t] is equivalent to the presence of
|
||||
the option.
|
||||
|
||||
|
|
|
@ -45,6 +45,10 @@
|
|||
(cond
|
||||
[installation 'installation]
|
||||
[user 'user]
|
||||
[(path-string? given-scope)
|
||||
;; This can happens when a #:scope value is given a path programmatically.
|
||||
;; Make it easier on clients by alloing that.
|
||||
(path->complete-path given-scope)]
|
||||
[scope-dir (path->complete-path scope-dir)]
|
||||
[else
|
||||
(define default-scope (default-pkg-scope))
|
||||
|
|
Loading…
Reference in New Issue
Block a user