Skip to content

Commit 7c75073

Browse files
committed
add support for no localappdata
1 parent ba65d6e commit 7c75073

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

R/pkg/R/install.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,11 @@ sparkCachePath <- function() {
270270
if (is_windows()) {
271271
winAppPath <- Sys.getenv("LOCALAPPDATA", unset = NA)
272272
if (is.na(winAppPath)) {
273-
stop(paste("%LOCALAPPDATA% not found.",
273+
message("%LOCALAPPDATA% not found. Falling back to %USERPROFILE%.")
274+
winAppPath <- Sys.getenv("USERPROFILE", unset = NA)
275+
}
276+
if (is.na(winAppPath)) {
277+
stop(paste("%LOCALAPPDATA% and %USERPROFILE% not found.",
274278
"Please define the environment variable",
275279
"or restart and enter an installation path in localDir."))
276280
} else {

R/pkg/vignettes/sparkr-vignettes.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ vignette: >
3030
```{r setup, include=FALSE}
3131
library(knitr)
3232
opts_hooks$set(eval = function(options) {
33-
# override eval only on windows
33+
# override eval to FALSE only on windows
3434
if (.Platform$OS.type == "windows") {
3535
options$eval = FALSE
3636
}

0 commit comments

Comments
 (0)