From d65b9c9e33f85e87056b50b857e6d2ff6672f830 Mon Sep 17 00:00:00 2001 From: yofukashino Date: Sat, 19 Oct 2024 04:05:18 +0530 Subject: [PATCH] macos support --- scripts/inject/injector.mts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/inject/injector.mts b/scripts/inject/injector.mts index 1403788d5..f05894223 100644 --- a/scripts/inject/injector.mts +++ b/scripts/inject/injector.mts @@ -231,7 +231,10 @@ export const smartInject = async ( ): Promise => { let result; - const processName = PlatformNames[platform].replace(" ", ""); + const processName = + process.platform === "darwin" + ? PlatformNames[platform] + : PlatformNames[platform].replace(" ", ""); if (!noRelaunch) { try { if ((replug && cmd === "uninject") || !replug) { @@ -269,7 +272,7 @@ export const smartInject = async ( }); break; case "darwin": - openProcess(`open -a ${PlatformNames[platform]}`); + openProcess(`open -a "${join(appDir, "..", "..", "..")}"`); break; } }