Skip to content

Commit

Permalink
fix: edge case around "latest" being the "latest" version
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed May 1, 2024
1 parent 91291e0 commit 33f5473
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/forge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ pub trait Forge: Debug + Send + Sync {
}
None => {
let installed_symlink = self.fa().installs_path.join("latest");
if installed_symlink.is_symlink() {
if installed_symlink.exists() {
if !installed_symlink.is_symlink() {
return Ok(Some("latest".to_string()));
}
let target = installed_symlink.read_link()?;
let version = target
.file_name()
Expand Down

0 comments on commit 33f5473

Please sign in to comment.