diff --git a/pkgs/racket-pkgs/racket-doc/pkg/scribblings/apis.scrbl b/pkgs/racket-pkgs/racket-doc/pkg/scribblings/apis.scrbl index 08c08e0d4f..28319544ef 100644 --- a/pkgs/racket-pkgs/racket-doc/pkg/scribblings/apis.scrbl +++ b/pkgs/racket-pkgs/racket-doc/pkg/scribblings/apis.scrbl @@ -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. diff --git a/racket/collects/pkg/main.rkt b/racket/collects/pkg/main.rkt index 4e251e44bf..d44335a047 100644 --- a/racket/collects/pkg/main.rkt +++ b/racket/collects/pkg/main.rkt @@ -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))