Skip to content

Commit

Permalink
add support for no localappdata
Browse files Browse the repository at this point in the history
  • Loading branch information
felixcheung committed Aug 21, 2017
1 parent ba65d6e commit 7c75073
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion R/pkg/R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,11 @@ sparkCachePath <- function() {
if (is_windows()) {
winAppPath <- Sys.getenv("LOCALAPPDATA", unset = NA)
if (is.na(winAppPath)) {
stop(paste("%LOCALAPPDATA% not found.",
message("%LOCALAPPDATA% not found. Falling back to %USERPROFILE%.")
winAppPath <- Sys.getenv("USERPROFILE", unset = NA)
}
if (is.na(winAppPath)) {
stop(paste("%LOCALAPPDATA% and %USERPROFILE% not found.",
"Please define the environment variable",
"or restart and enter an installation path in localDir."))
} else {
Expand Down
2 changes: 1 addition & 1 deletion R/pkg/vignettes/sparkr-vignettes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ vignette: >
```{r setup, include=FALSE}
library(knitr)
opts_hooks$set(eval = function(options) {
# override eval only on windows
# override eval to FALSE only on windows
if (.Platform$OS.type == "windows") {
options$eval = FALSE
}
Expand Down

0 comments on commit 7c75073

Please sign in to comment.