diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 75ea0be..fd021c0 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -65,13 +65,10 @@ jobs: shell: Rscript {0} - name: Install h5diff - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt-get install hdf5-tools - else - echo "$RUNNER_OS not supported" - exit 1 - fi + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get install hdf5-tools + fi shell: bash diff --git a/tests/testthat/helper-skip_if_no_h5diff.R b/tests/testthat/helper-skip_if_no_h5diff.R index 7e31f79..8368324 100644 --- a/tests/testthat/helper-skip_if_no_h5diff.R +++ b/tests/testthat/helper-skip_if_no_h5diff.R @@ -1,7 +1,7 @@ # helper function to skip tests if h5diff is not available skip_if_no_h5diff <- function(){ testthat::skip_if( - !system("h5diff", intern = TRUE), + !system("which h5diff", ignore.stdout = TRUE), message = "h5diff not available for testing" ) } \ No newline at end of file