[rkward] /: Silency the more confusing warnings when calling require() on a non-installed package.

Thomas Friedrichsmeier null at kde.org
Thu May 17 09:21:39 UTC 2018


Git commit 00642f78d06ae2b2beb1595a4b79e9798778db3b by Thomas Friedrichsmeier.
Committed on 17/05/2018 at 09:21.
Pushed by tfry into branch 'master'.

Silency the more confusing warnings when calling require() on a non-installed package.

M  +1    -0    ChangeLog
M  +1    -1    rkward/rbackend/rpackages/rkward/R/base_overrides.R

https://commits.kde.org/rkward/00642f78d06ae2b2beb1595a4b79e9798778db3b

diff --git a/ChangeLog b/ChangeLog
index 6886d14e..d697090a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 --- Version 0.7.1 - UNRELEASED
+- Slighlty less confusing output in case a package is installed from require(), such as in many plugins
 - Fixed: RKWard icon was missing for the "enhances RKWard" column in package installation dialog
 - Fixed a layout issue in plugins using <stretch>-elements that would sometimes also render top-left aligned UI-elements unsuable.
 - Remove a bit of unused empty space around the main area of plugin dialogs
diff --git a/rkward/rbackend/rpackages/rkward/R/base_overrides.R b/rkward/rbackend/rpackages/rkward/R/base_overrides.R
index 9d2e2a6c..1a9878ba 100644
--- a/rkward/rbackend/rpackages/rkward/R/base_overrides.R
+++ b/rkward/rbackend/rpackages/rkward/R/base_overrides.R
@@ -21,7 +21,7 @@
 	if (!character.only) {
 		package <- as.character(substitute(package))
 	}
-	if (!base::require(as.character(package), quietly = quietly, character.only = TRUE, ...)) {
+	if (!suppressWarnings(base::require(as.character(package), quietly = quietly, character.only = TRUE, ...))) {
 		.rk.do.call("require", as.character(package))
 		invisible(base::require(as.character(package), quietly = TRUE, character.only = TRUE, ...))
 	} else {



More information about the rkward-tracker mailing list