Skip to content

Latest release not found if user has other named directories in .cmdstan #650

Closed
@jgabry

Description

@jgabry

Describe the bug

Inside the default .cmdstan directory if the user has a subdirectory foo (really any directory name alphabetically after "cmdstan") then CmdStanR will try to set the path too foo instead of the latest cmdstan release. This is because this line sorts all names, not only ones starting with "cmdstan":

latest_cmdstan <- sort(cmdstan_installs, decreasing = TRUE)[1]

This won't affect anyone who doesn't manually mess with the .cmdstan directory but @mitzimorris and I discovered this issue today because she had some custom directories in .cmdstan for development purposes.

To Reproduce

Add a directory foo to .cmdstan and then reload the package.

I'll make a PR to fix this.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions