mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[bugfix] Ensure BSInstances exist before running depotdownloader
This commit is contained in:
@@ -7,7 +7,7 @@ import log from "electron-log";
|
||||
import { InstallationLocationService } from "./installation-location.service";
|
||||
import { BSLocalVersionService } from "./bs-local-version.service";
|
||||
import { WindowManagerService } from "./window-manager.service";
|
||||
import { copy } from "fs-extra";
|
||||
import { copy, ensureDir } from "fs-extra";
|
||||
import { pathExist } from "../helpers/fs.helpers";
|
||||
import { Observable, map } from "rxjs";
|
||||
import { DepotDownloaderArgsOptions, DepotDownloaderErrorEvent, DepotDownloaderEvent, DepotDownloaderEventType, DepotDownloaderInfoEvent } from "../../shared/models/depot-downloader.model";
|
||||
@@ -77,12 +77,14 @@ export class BSInstallerService {
|
||||
qr
|
||||
}
|
||||
|
||||
await ensureDir(this.installLocationService.versionsDirectory);
|
||||
|
||||
return new DepotDownloader({
|
||||
command: this.getDepotDownloaderExePath(),
|
||||
args: DepotDownloader.buildArgs(depotDownloaderOptions),
|
||||
options: { cwd: this.installLocationService.versionsDirectory },
|
||||
echoStartData: downloadVersion
|
||||
});
|
||||
}, log);
|
||||
}
|
||||
|
||||
private buildDepotDownloaderObservable(downloadInfos: DownloadInfo, qr?: boolean): Observable<DepotDownloaderEvent> {
|
||||
|
||||
Reference in New Issue
Block a user