Skip to content

Commit

Permalink
Don't assume RStudio
Browse files Browse the repository at this point in the history
Fixes #1657
  • Loading branch information
hadley committed Nov 13, 2017
1 parent 9c87587 commit f2af984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/document.r
Expand Up @@ -24,7 +24,7 @@ document <- function(pkg = ".", clean = NULL, roclets = NULL, reload = TRUE) {
pkg <- as.package(pkg)
message("Updating ", pkg$package, " documentation")

if (rstudioapi::hasFun("documentSaveAll")) {
if (rstudioapi::isAvailable() && rstudioapi::hasFun("documentSaveAll")) {
rstudioapi::documentSaveAll()
}

Expand Down

0 comments on commit f2af984

Please sign in to comment.