Skip to content

Commit

Permalink
fix(R microkernel): Suppress messages on install
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Dec 6, 2021
1 parent 161119b commit ca46d8a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rust/kernel-r/src/r-codec.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Install necessary packages (if not already)
for (pkg in c("jsonlite", "base64enc")) {
if (!suppressPackageStartupMessages(require(pkg, character.only = TRUE, quietly=TRUE))) {
install.packages(pkg, quiet = TRUE, repo="http://cran.rstudio.com/")
suppressPackageStartupMessages(require(pkg, character.only = TRUE, quietly=TRUE))
if (!suppressMessages(require(pkg, character.only = TRUE, quietly=TRUE))) {
suppressMessages(install.packages(pkg, quiet = TRUE, repo="http://cran.rstudio.com/"))
suppressMessages(require(pkg, character.only = TRUE, quietly=TRUE))
}
}

Expand Down

0 comments on commit ca46d8a

Please sign in to comment.