Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,9 +735,14 @@ pub fn install_version(
version_db: &JuliaupVersionDB,
paths: &GlobalPaths,
) -> Result<()> {
// Return immediately if the version is already installed.
if config_data.installed_versions.contains_key(fullversion) {
return Ok(());
// Return immediately if the version is already installed and the directory exists on disk.
if let Some(existing) = config_data.installed_versions.get(fullversion) {
let existing_path = paths.juliauphome.join(&existing.path);
if existing_path.exists() {
return Ok(());
}
// Directory is missing on disk, remove stale entry and re-install.
config_data.installed_versions.remove(fullversion);
}

// TODO At some point we could put this behind a conditional compile, we know
Expand Down
Loading