Skip to content

Commit 2bcacce

Browse files
author
smeyer
committed
respect --verbose when loading default packages
git-svn-id: https://svn.r-project.org/R/trunk@88113 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 3ed7f5e commit 2bcacce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/library/profile/Common.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ local({
6969

7070
.First.sys <- function()
7171
{
72+
verbose <- getOption("verbose", FALSE)
7273
for(pkg in getOption("defaultPackages")) {
73-
res <- require(pkg, quietly = TRUE, warn.conflicts = FALSE,
74+
res <- require(pkg, quietly = !verbose, warn.conflicts = FALSE,
7475
character.only = TRUE)
7576
if(!res)
7677
warning(gettextf('package %s in options("defaultPackages") was not found', sQuote(pkg)),
@@ -83,7 +84,7 @@ local({
8384
{
8485
pkg <- "methods" # done this way to avoid R CMD check warning
8586
if(pkg %in% getOption("defaultPackages"))
86-
if(!require(pkg, quietly = TRUE, warn.conflicts = FALSE,
87+
if(!require(pkg, quietly = !getOption("verbose", FALSE), warn.conflicts = FALSE,
8788
character.only = TRUE))
8889
warning('package "methods" in options("defaultPackages") was not found',
8990
call. = FALSE)

0 commit comments

Comments
 (0)