Skip to content

Commit 13784e4

Browse files
BUG FIX: Argument 'workers' of type character was silently accepted [#34]
1 parent 3c456dc commit 13784e4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

NEWS

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
Package: future.batchtools
22
==========================
33

4-
Version: 0.7.2-9000 [2018-12-22]
4+
Version: 0.7.2-9000 [2019-01-22]
55

66
BUG FIXES:
77

88
* Argument 'workers' could not be a function.
9-
9+
10+
* Argument 'workers' of type character was silently accepted and effectively
11+
interpreted as workers = length(workers).
12+
1013

1114
Version: 0.7.2 [2018-12-03]
1215

R/BatchtoolsFuture-class.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ BatchtoolsFuture <- function(expr = NULL, envir = parent.frame(),
6464
stop_if_not(length(workers) >= 1)
6565
if (is.numeric(workers)) {
6666
stop_if_not(!anyNA(workers), all(workers >= 1))
67-
} else if (is.character(workers)) {
6867
} else {
69-
stop("Argument 'workers' should be either numeric or character: ",
68+
stop("Argument 'workers' should be either a numeric or a function: ",
7069
mode(workers))
7170
}
7271
}

0 commit comments

Comments
 (0)