Skip to content

Commit 0ba8471

Browse files
committed
Fix error when installing a mod that depends on a testing dependency
1 parent ed32dad commit 0ba8471

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
# Change Log
44

55
## [Unreleased]
6+
7+
### Fixed
8+
9+
- Fix error when installing a mod that depends on a testing dependency
10+
611
## [1.1.2] 2025-10-15
712

813
### Fixed

src/mod-installer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ export class ModInstaller {
143143
}
144144

145145
private static getModByDepName(depName: string): ModEntryServer | undefined {
146-
return this.record[depName] || this.byNameRecord[depName]
146+
let mod = this.record[depName] || this.byNameRecord[depName]
147+
if (mod?.testingVersion && ModDB.isModTestingOptIn(mod.id)) mod = mod.testingVersion
148+
return mod
147149
}
148150

149151
private static setOrAddNewer(record: Record<string, DepEntry>, mod: ModEntryServer, ...reqVersionRange: string[]) {

0 commit comments

Comments
 (0)