mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
fix erreur when space in path when download a version
This commit is contained in:
@@ -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<boolean>{
|
||||
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;
|
||||
|
||||
@@ -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 (
|
||||
<div ref={ref} onClick={handleClick} title={t(title)} className={`${className} overflow-hidden cursor-pointer group ${(!withBar && !disabled && (!!typeColor || !!color)) && "hover:brightness-[1.15]"} ${disabled && "brightness-75 cursor-not-allowed"} ${renderTypeColor}`} style={{...style, backgroundColor: primaryColor || color}}>
|
||||
|
||||
Reference in New Issue
Block a user