Skip to content

Commit 1795448

Browse files
BUG FIX: _R_CHECK_LIMIT_CORES_ was incorrectly set to TRUE when package was loaded in Positron Console [#139]
1 parent 4c71741 commit 1795448

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: parallelly
2-
Version: 1.46.0-9006
2+
Version: 1.46.0-9007
33
Title: Enhancing the 'parallel' Package
44
Imports:
55
parallel,

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Bug Fixes
44

5+
* Loading the package in the Positron Console would incorrectly set
6+
environment variable `_R_CHECK_LIMIT_CORES_` to TRUE, which in turn
7+
would result in `availableCores()` being limited to a maximum of
8+
two (2) CPU cores.
9+
510
* `parallel::clusterExport()` on a `makeClusterSequential()` cluster
611
would export to the global environment rather than the local
712
environment of the cluster nodes.

R/utils.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ inRCmdCheck <- function() { queryRCmdCheck() != "notRunning" }
114114

115115
inRCmdVignette <- function() {
116116
r_cmd <- Sys.getenv("R_CMD", NA_character_)
117-
if (is.null(r_cmd)) return(FALSE)
117+
if (is.na(r_cmd)) return(FALSE)
118118
args <- commandArgs()
119119
if (length(args) != 6) return(FALSE)
120120
truth <- c(r_cmd, "--no-echo", "--no-restore", "--vanilla", "-e", "tools::buildVignettes(dir~+~=~+~'.',~+~tangle~+~=~+~TRUE)")
121-
any(args != truth)
121+
any(args == truth)
122122
}
123123

124124
commaq <- function(x, sep = ", ") paste(sQuote(x), collapse = sep)

0 commit comments

Comments
 (0)