Skip to content

Commit

Permalink
Fixes for Redhat
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Oct 22, 2024
1 parent 44cb6e8 commit 015c134
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/RHEL-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ jobs:
subscription-manager register \
--org ${{ secrets.REDHAT_ORG }} \
--activationkey ${{ secrets.REDHAT_KEY }}
shell: bash

- name: Install R
if: ${{ matrix.config.r != 'release' }}
run: |
rig add ${{ matrix.config.r }}
yum install -y --allowerasing diffutils perl libcurl
shell: bash

- uses: r-lib/actions/setup-r-dependencies@v2
Expand All @@ -43,9 +38,11 @@ jobs:

- uses: r-lib/actions/check-r-package@v2
with:
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
args: '"--no-manual"'
env:
NOT_CRAN: true
_R_CHECK_DOC_SIZES_: FALSE
LANG: en_US.UTF-8

- name: Unregister
if: always()
Expand Down
9 changes: 7 additions & 2 deletions R/onload.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.onAttach <- function(libname, pkgname){
ssl <- sub("\\(.*\\)\\W*", "", curl_version()$ssl_version)
msg <- paste("Using libcurl", curl_version()$version, "with", ssl)
version <- curl_version()
ssl <- sub("\\(.*\\)\\W*", "", version$ssl_version)
msg <- paste("Using libcurl", version$version, "with", ssl)
packageStartupMessage(msg)
if(grepl("redhat", R.version$platform) && !('smtp' %in% version$protocols)){
packageStartupMessage(c("Your system runs libcurl-minimal which does not support all protocols: ",
"See also https://github.com/jeroen/curl/issues/350"))
}
}

.onLoad <- function(libname, pkgname){
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-path.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ test_that("curl_download() and curl_fetch_disk() can write to a non-ASCII path",
})

test_that("curl_download() does not store failed downloads", {
skip_if_not(grepl('UTF-8', Sys.getlocale()))
dest1 <- tempfile(pattern = tricky_filename)
curl_download(httpbin("get"), destfile = dest1)
expect_true(file.exists(dest1))
Expand Down

0 comments on commit 015c134

Please sign in to comment.