diff --git a/src/main/services/bs-installer.service.ts b/src/main/services/bs-installer.service.ts index 9f5f1452..26a25aa3 100644 --- a/src/main/services/bs-installer.service.ts +++ b/src/main/services/bs-installer.service.ts @@ -38,8 +38,12 @@ export class BSInstallerService{ return BSInstallerService.instance; } + private escapeSpaces(path: string): string{ + return `\"${path}\"` + } + private getDepotDownloaderExePath(): string{ - return path.join(this.utils.getAssetsScriptsPath(), 'depot-downloader', 'DepotDownloader.exe'); + return this.escapeSpaces(path.join(this.utils.getAssetsScriptsPath(), 'depot-downloader', 'DepotDownloader.exe')); } private removeSpecialSchar(txt: string): string{ return txt.replaceAll(/\[|\]/g, ""); } @@ -68,7 +72,7 @@ export class BSInstallerService{ public async isDotNet6Installed(): Promise{ try{ - const process = spawnSync(this.getDepotDownloaderExePath()); + const process = spawnSync(this.getDepotDownloaderExePath(), {shell: true}); const out = process.output.toString(); if(out.includes(".NET runtime can be found at")){ return false; } return true; diff --git a/src/renderer/components/shared/bsm-button.component.tsx b/src/renderer/components/shared/bsm-button.component.tsx index fb95f172..957aee10 100644 --- a/src/renderer/components/shared/bsm-button.component.tsx +++ b/src/renderer/components/shared/bsm-button.component.tsx @@ -52,7 +52,7 @@ export function BsmButton({className, style, imgClassName, iconClassName, icon, return ""; })(); - const handleClick = (e: MouseEvent) => !disabled && onClick(e); + const handleClick = (e: MouseEvent) => !disabled && onClick?.(e); return (