Two problems were encountered using use_bbi on Windows:
no bbi reported as being installed despite use_bbi downloading it
the "please either set..." message being shown despite that being set
The first one looks to be because Sys.which will come up empty on Windows unless the path ends with ".exe". When on Windows, we might want to check that the binary path ends with ".exe", but we should at least change build_bbi_install_path so that it tacks on ".exe":
The second issue is because install_menu uses normalizePath, and add_to_path_message compares that value to bbr.bbi_exe_path. normalizePath by default converts "/" to "\", so the bbi_exe_path value needs to use the same form. (Note that file.path on windows uses "/" by default.) This fix here is probably to make add_to_path_message feed bbr.bbi_exe_path to normalizePath before comparing.
Two problems were encountered using
use_bbi
on Windows:no bbi reported as being installed despite
use_bbi
downloading itthe "please either set..." message being shown despite that being set
The first one looks to be because
Sys.which
will come up empty on Windows unless the path ends with ".exe". When on Windows, we might want to check that the binary path ends with ".exe", but we should at least changebuild_bbi_install_path
so that it tacks on ".exe":https://github.com/metrumresearchgroup/bbr/blob/d4453a98a63051b76dcc20380e69646a1acd9177/R/use-bbi.R#L224-L227
Note also that there is already this:
https://github.com/metrumresearchgroup/bbr/blob/d4453a98a63051b76dcc20380e69646a1acd9177/R/aaa.R#L1-L5
The second issue is because
install_menu
usesnormalizePath
, andadd_to_path_message
compares that value tobbr.bbi_exe_path
.normalizePath
by default converts "/" to "\", so thebbi_exe_path
value needs to use the same form. (Note thatfile.path
on windows uses "/" by default.) This fix here is probably to makeadd_to_path_message
feedbbr.bbi_exe_path
tonormalizePath
before comparing.