[bugfix-681] addressed linting and sonarqube issues

This commit is contained in:
silentrald
2024-12-05 21:29:25 +08:00
parent c2e77f2520
commit 8771ac2adc
2 changed files with 6 additions and 8 deletions
+6 -6
View File
@@ -15,10 +15,10 @@ export class BSVersionLibService {
private static instance: BSVersionLibService;
private linuxService: LinuxService;
private utilsService: UtilsService;
private requestService: RequestService;
private configService: StaticConfigurationService;
private readonly linuxService: LinuxService;
private readonly utilsService: UtilsService;
private readonly requestService: RequestService;
private readonly configService: StaticConfigurationService;
private bsVersions: BSVersion[];
@@ -48,7 +48,7 @@ export class BSVersionLibService {
private async getLocalVersions(): Promise<BSVersion[]> {
const localVersionsPath = path.join(this.utilsService.getAssestsJsonsPath(), this.VERSIONS_FILE);
if (!this.shouldLoadFromConfig()) {
if (!(await this.shouldLoadFromConfig())) {
return readJSON(localVersionsPath);
}
@@ -60,7 +60,7 @@ export class BSVersionLibService {
}
private async updateLocalVersions(versions: BSVersion[]): Promise<void> {
if (this.shouldLoadFromConfig()) {
if (await this.shouldLoadFromConfig()) {
this.configService.set("versions", versions);
return;
}
-2
View File
@@ -5,8 +5,6 @@ import { BS_APP_ID, IS_FLATPAK, PROTON_BINARY_PREFIX, WINE_BINARY_PREFIX } from
import { StaticConfigurationService } from "./static-configuration.service";
import { CustomError } from "shared/models/exceptions/custom-error.class";
import { BSLaunchError, LaunchOption } from "shared/models/bs-launch";
import { app } from "electron";
import config from "../../../electron-builder.config";
import { bsmExec } from "main/helpers/os.helpers";
export class LinuxService {