Skip to content

Commit

Permalink
Emphasize if the version of macOS is supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Dec 7, 2023
1 parent 85af401 commit 8292fc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions R/assertions.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ assert_mac = function(){
assert(is_macos(), "On macOS")
}

#' @rdname assert
#' @export
assert_macos_supported = function() {
assert(is_macos_r_supported(), "On supported macOS version")
}

#' @rdname assert
#' @export
assert_aarch64 = function(){
Expand Down
6 changes: 1 addition & 5 deletions R/gfortran.R
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ gfortran_version = function() {
#' @rdname gfortran
gfortran_install = function(password = getOption("macrtools.password"), verbose = TRUE) {
assert_mac()
assert_macos_supported()

if(isTRUE(is_gfortran_installed())) {
if(verbose) {
Expand All @@ -166,11 +167,6 @@ gfortran_install = function(password = getOption("macrtools.password"), verbose
return(invisible(TRUE))
}

if (!is_macos_r_supported()) {
cat("R version", getRversion(),"is not supported. Please upgrade.\n")
return(invisible(FALSE))
}

if (verbose) {
cat("\n\nAttempting to download and install gfortran ...\n")
cat("\nWe expect the installation to take between 2 to 5 minutes.\n\n")
Expand Down

0 comments on commit 8292fc6

Please sign in to comment.