Skip to content

Commit

Permalink
fix(core): allow reinstallation of broken package
Browse files Browse the repository at this point in the history
  • Loading branch information
mitosagi committed Sep 28, 2024
1 parent 8b82d79 commit 329bea5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/renderer/main/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async function displayInstalledVersion(instPath: string) {
'バージョン: ' +
installedVersion +
description +
'(ファイルの存在が確認できませんでした。)',
'(未導入ファイルあり)',
);
}
} else {
Expand Down Expand Up @@ -514,7 +514,10 @@ async function batchInstall(instPath: string) {
const packages = allPackages.filter(
(p) =>
p.info.directURL &&
p.installationStatus === packageUtil.states.notInstalled,
[
packageUtil.states.notInstalled,
packageUtil.states.installedButBroken,
].some((status) => status === p.installationStatus),
);
for (const packageItem of packages) {
await packageMain.installPackage(instPath, packageItem, true);
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/main/packageUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ type aviutlExtention = keyof typeof typeForExtention;
/** Installation state of packages */
const states = {
installed: 'インストール済み',
installedButBroken:
'未インストール(ファイルの存在が確認できませんでした。)',
installedButBroken: 'インストール済み(未導入ファイルあり)',
manuallyInstalled: '手動インストール済み',
otherInstalled: '他バージョンがインストール済み',
notInstalled: '未インストール',
Expand Down

0 comments on commit 329bea5

Please sign in to comment.