Skip to content

Commit

Permalink
fix: conflict detection algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
mitosagi committed Dec 16, 2023
1 parent 297b4b8 commit de7993e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/main/packageUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,15 @@ function getInstalledVersionOfPackage(
let isInstalledPackage = false;
let isManuallyInstalledPackage = false;
for (const file of packageItem.info.files) {
if (file.isInstallOnly) continue; // isInstallOnly is not used to determine installation status because the file is often shared by multiple packages.
if (installedFiles.includes(file.filename)) isInstalledPackage = true;
if (manuallyInstalledFiles.includes(file.filename))
isManuallyInstalledPackage = true;
}
installationStatus = isManuallyInstalledPackage
? states.manuallyInstalled
: isInstalledPackage
? states.otherInstalled
? states.otherInstalled // Still an assumption in this line.
: states.notInstalled;

for (const [installedId, installedPackage] of Object.entries(
Expand Down

0 comments on commit de7993e

Please sign in to comment.