Skip to content

Commit

Permalink
fix match.arg on 'type' param for trace_package
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Jun 22, 2023
1 parent 63f07ff commit ef84c48
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: typetracer
Title: Trace Function Parameter Types
Version: 0.1.1.034
Version: 0.1.1.035
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265")),
Expand Down
8 changes: 4 additions & 4 deletions R/trace-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ trace_package <- function (package = NULL,
types = c ("examples", "tests"),
pkg_dir = NULL) {

types <- match.arg (types, c ("examples", "tests"),
several.ok = TRUE
)

package <- assert_trace_package_inputs (package, types, pkg_dir)
pkg_was_attached <- any (grepl (paste0 ("package:", package), search ()))
if (pkg_was_attached) {
Expand Down Expand Up @@ -119,10 +123,6 @@ assert_trace_package_inputs <- function (package = NULL,
types = c ("examples", "tests"),
pkg_dir = NULL) {

types <- match.arg (types, c ("examples", "tests"),
several.ok = TRUE
)

if (!is.null (pkg_dir)) {

checkmate::assert_character (pkg_dir)
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codeRepository": "https://github.com/mpadge/typetracer",
"issueTracker": "https://github.com/mpadge/typetracer/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.1.1.034",
"version": "0.1.1.035",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit ef84c48

Please sign in to comment.