r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
639 stars 56 forks source link

pkg_install ignores explicit version when that version does not exist #615

Open msteijaert opened 2 months ago

msteijaert commented 2 months ago

pkg_install() allows to install a specific version of a package. E.g., pak::pkg_install("data.table@1.15.2") will install data.table version 1.15.2. However, when I specify a non-existing version such as pak::pkg_install("data.table@1.15.1"), it does not complain, but installs the latest version instead (currently 1.15.4). I think it would be useful to throw an (optional) error or warning here.