Somehow the package fails to change directory even if cd works on windows:
library("multiloadr")
# add packages to multiloadr
add_pkgs("teal.reporter", "teal.reporter")
add_pkgs("teal.widgets", "teal.widgets")
add_pkgs("teal", "teal")
# load packages from presently active branch
load_pkgs(branch_name = c("teal_reportable", "main"))
## Error in system2("cd", args = c(path, "&& git branch"), stdout = TRUE) :
## '"cd"' not found
traceback()
## 3: system2("cd", args = c(path, "&& git branch"), stdout = TRUE) at load_pkgs.R#154
## 2: get_local_and_remote_branches(path) at load_pkgs.R#78
## 1: load_pkgs(branch_name = c("teal_reportable", "main"))
sessionInfo()
## R version 4.5.1 (2025-06-13 ucrt)
## Platform: x86_64-w64-mingw32/x64
## Running under: Windows 11 x64 (build 22631)
##
## Matrix products: default
## LAPACK version 3.12.1
##
## locale:
## [1] LC_COLLATE=Spanish_Spain.utf8
## [2] LC_CTYPE=Spanish_Spain.utf8
## [3] LC_MONETARY=Spanish_Spain.utf8
## [4] LC_NUMERIC=C
## [5] LC_TIME=Spanish_Spain.utf8
##
## time zone: Europe/Madrid
## tzcode source: internal
##
## attached base packages:
## [1] stats graphics grDevices utils datasets
## [6] methods base
##
## other attached packages:
## [1] multiloadr_0.0.2 pkgdown_2.1.3 devtools_2.4.5
## [4] usethis_3.1.0
##
## loaded via a namespace (and not attached):
## [1] vctrs_0.6.5 cli_3.6.5 rlang_1.1.6
## [4] purrr_1.0.4 pkgload_1.4.0 promises_1.3.3
## [7] shiny_1.11.1 xtable_1.8-4 rutils_0.0.2.92
## [10] glue_1.8.0 htmltools_0.5.8.1 httpuv_1.6.16
## [13] pkgbuild_1.4.8 ellipsis_0.3.2 fastmap_1.2.0
## [16] lifecycle_1.0.4 memoise_2.0.1 compiler_4.5.1
## [19] miniUI_0.1.2 sessioninfo_1.2.3 fs_1.6.6
## [22] htmlwidgets_1.6.4 Rcpp_1.0.14 urlchecker_1.0.1
## [25] rstudioapi_0.17.1 later_1.4.2 digest_0.6.37
## [28] R6_2.6.1 magrittr_2.0.3 tools_4.5.1
## [31] mime_0.13 profvis_0.4.0 remotes_2.5.0
## [34] cachem_1.1.0
Somehow the package fails to change directory even if
cdworks on windows: