Skip to content

Commit

Permalink
Temporary fix for xml2 (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten authored Oct 25, 2019
1 parent 9fc548e commit faaf1fe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions templates/usr/local/bin/R-install-package.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ if (type == 'github') {
if (!(package %in% installed.packages(lib.loc = lib)[, 'Package'])) {
if (type == 'cran') {
repos = ifelse(is.na(argv[4]), '{{ r_packages_repos.rstrip('/') }}', argv[4]);

# Temporary fix for: https://github.com/r-lib/xml2/issues/231
if (package %in% c('devtools', 'xml2')) {
if (!('withr' %in% installed.packages(lib.loc = lib)[, 'Package'])) {
install.packages(p, lib, repos)
}
withr::with_makevars(c(CXX = 'g++ -std=c++11'), install.packages('xml2', lib, repos))
}

withCallingHandlers({
install.packages(package, lib, repos);
cat("changed\n");
Expand Down

0 comments on commit faaf1fe

Please sign in to comment.