Skip to content

Commit

Permalink
conditionally use whoami
Browse files Browse the repository at this point in the history
  • Loading branch information
‘topepo’ committed Jul 18, 2024
1 parent a229171 commit cc2adcf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ Imports:
rstudioapi,
tools,
utils,
whoami,
yaml
Suggests:
curl,
knitr,
rsconnect (>= 0.8.26),
testthat (>= 3.1.7),
withr,
whoami,
xfun
VignetteBuilder:
quarto
Expand Down
1 change: 1 addition & 0 deletions R/new-blog-post.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#'
new_blog_post <- function(title, dest = NULL, open = rlang::is_interactive(),
call = rlang::current_env(), ...) {
rlang::check_installed("whoami")

if (is.null(dest)) {
# Scrub title to make directory name
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-new-blog-post.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("Create a blog post", {
skip_if_no_quarto("1.4")
skip_if_not_installed("whoami")

current_dir <- getwd()

Expand Down

0 comments on commit cc2adcf

Please sign in to comment.