Skip to content

Commit

Permalink
fix: prevent crashing if "latest" is not a symlink
Browse files Browse the repository at this point in the history
Fixes #2011
  • Loading branch information
jdx committed May 1, 2024
1 parent 669530c commit 91291e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/forge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub trait Forge: Debug + Send + Sync {
}
None => {
let installed_symlink = self.fa().installs_path.join("latest");
if installed_symlink.exists() {
if installed_symlink.is_symlink() {
let target = installed_symlink.read_link()?;
let version = target
.file_name()
Expand Down

0 comments on commit 91291e0

Please sign in to comment.