From 2ef8dff8a619aa0fe220083a622fcf3f296ca77d Mon Sep 17 00:00:00 2001 From: zcf0508 Date: Wed, 23 Oct 2024 13:07:27 +0800 Subject: [PATCH] fix: Compatible with paths containing spaces --- src/main/autocut/download.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/autocut/download.ts b/src/main/autocut/download.ts index 2bf4bae..b2c9dca 100644 --- a/src/main/autocut/download.ts +++ b/src/main/autocut/download.ts @@ -135,8 +135,8 @@ function unzip( cb("error", `解压失败:${err},请重试`) } else { if(os.platform().indexOf("darwin") === 0){ - execSync(`chmod -R 777 ${path.resolve(excutePath, "..")}`) - execSync(`cd ${path.resolve(excutePath, "..")} && bash ./build.sh`) + execSync(`chmod -R 777 "${path.resolve(excutePath, "..")}"`) + execSync(`cd "${path.resolve(excutePath, "..")}" && bash ./build.sh`) } cb("success", excutePath ) }