[bugfix] don't fallback on wineprefix and show error on mod install

This commit is contained in:
silentrald
2025-02-08 09:38:34 +08:00
parent 04f1b00a0b
commit ff3d82238f
2 changed files with 5 additions and 5 deletions
+2 -1
View File
@@ -588,7 +588,8 @@
"msg": {
"success": "All mods have been uninstalled.",
"errors": {
"no-mods": "No mods are installed in this version 😑"
"no-mods": "No mods are installed in this version 😑",
"no-wineprefix": "Could not find BSManager WINEPREFIX path, please launch beat saber in BSManager first."
}
}
},
@@ -158,11 +158,10 @@ export class BsModsManagerService {
winePath = `"${winePathResult}"`;
const winePrefix = this.linuxService.getWinePrefixPath();
if (winePrefix) {
env.WINEPREFIX = winePrefix;
} else {
log.warn("Could not find BSManager WINEPREFIX path, using system's default value instead");
if (!winePrefix) {
throw new CustomError("Could not find BSManager WINEPREFIX path", "no-wineprefix");
}
env.WINEPREFIX = winePrefix;
}
return new Promise<boolean>(resolve => {