Skip to content

Commit d67737f

Browse files
committed
Bug correction in update_pkg()
1 parent 9b5a486 commit d67737f

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: learndown
22
Type: Package
3-
Version: 1.2.0
3+
Version: 1.2.1
44
Title: 'SciViews' - R Markdown and Bookdown Additions for Learning Material
55
Description: Extension to R Markdown and Bookdown for building better learning
66
and e-learning material: H5P integration, course-contextual divs, different

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# learndown 1.2.1
2+
3+
- Bug correction: when update_pkg() encountered a more recent version of the package, it upgraded it anyway.
4+
15
# learndown 1.2.0
26

37
- There are now more GitHub assignation types : `assign2()` for group assignations and `challenge()`/`challenge2()` for assignations linked to challenges (individual or in groups).

R/run.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ update_pkg <- function(package, github_repos, upgrade = "never") {
181181
if (is.null(token)) {
182182
NULL
183183
} else {
184-
authenticate(token, "x-oauth-basic", "basic")
184+
httr::authenticate(token, "x-oauth-basic", "basic")
185185
}
186186
}
187187

@@ -244,7 +244,7 @@ update_pkg <- function(package, github_repos, upgrade = "never") {
244244
last_rel <- sub("^[vV]([0-9]+\\.[0-9]+)\\.([0-9]+)$", "\\1-\\2", last_tag)
245245
curr_rel <- sub("^([0-9]+\\.[0-9]+)\\.([0-9]+)$", "\\1-\\2",
246246
packageVersion(package))
247-
status <- try(compareVersion(last_rel, curr_rel) != 0, silent = TRUE)
247+
status <- try(compareVersion(last_rel, curr_rel), silent = TRUE)
248248
if (!inherits(status, "try-error")) {
249249
if (status > 0) {
250250
# We need to update the package

0 commit comments

Comments
 (0)