@@ -230,41 +230,29 @@ install_pkgs_with_callr <- function(
230230) {
231231 stopifnot(length(list (... )) == 0 )
232232 callr :: r(
233- function (repos_option , packages , upgrade , dependencies , is_windows ) {
233+ function (repos_option , packages , upgrade , dependencies ) {
234234 options(repos = repos_option )
235235
236- if (is_windows ) {
237- message(
238- " Installing packages with install.packages(): " ,
239- paste0(packages , collapse = " , " )
240- )
241- # Throw if any installation produces a warning
242- # Ex: In install.packages(packages) : installation of package 'terra' had non-zero exit status
243- options(warn = 2 )
244- install.packages(packages )
245- } else {
246- # Performing a leap of faith that pak is installed.
247- # Avoids weird installs when using pak to install shinycoreci
248- stopifnot(utils :: packageVersion(" pak" ) > = " 0.3.0" )
249- pak__pkg_install <- utils :: getFromNamespace(" pkg_install" , " pak" )
250- message(
251- " Installing packages with pak::pkg_install(): " ,
252- paste0(packages , collapse = " , " )
253- )
254- pak__pkg_install(
255- packages ,
256- ask = FALSE , # Not interactive, so don't ask
257- upgrade = upgrade ,
258- dependencies = dependencies
259- )
260- }
236+ # Performing a leap of faith that pak is installed.
237+ # Avoids weird installs when using pak to install shinycoreci
238+ stopifnot(utils :: packageVersion(" pak" ) > = " 0.3.0" )
239+ pak__pkg_install <- utils :: getFromNamespace(" pkg_install" , " pak" )
240+ message(
241+ " Installing packages with pak::pkg_install(): " ,
242+ paste0(packages , collapse = " , " )
243+ )
244+ pak__pkg_install(
245+ packages ,
246+ ask = FALSE , # Not interactive, so don't ask
247+ upgrade = upgrade ,
248+ dependencies = dependencies
249+ )
261250 },
262251 list (
263252 repos_option = shinyverse_repos_option(),
264253 packages = packages ,
265254 upgrade = upgrade ,
266- dependencies = dependencies ,
267- is_windows = is_windows()
255+ dependencies = dependencies
268256 ),
269257 show = TRUE ,
270258 libpath = libpath ,
0 commit comments