From dea7351771cfa5511f34119b79da84aa9c540903 Mon Sep 17 00:00:00 2001 From: "lizhou.zhu" Date: Tue, 27 Sep 2022 16:47:46 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8DExistProgram=E5=9C=A8?= =?UTF-8?q?=E9=9D=9EWindows=E5=B9=B3=E5=8F=B0=E6=97=A0=E6=B3=95=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=AD=A3=E7=A1=AE=E7=BB=93=E6=9E=9C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit linux和OSX中并没有where命令 --- Editor/Installer/BashUtil.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Editor/Installer/BashUtil.cs b/Editor/Installer/BashUtil.cs index 9927ab0..0a6bc21 100644 --- a/Editor/Installer/BashUtil.cs +++ b/Editor/Installer/BashUtil.cs @@ -52,7 +52,12 @@ namespace HybridCLR.Editor.Installer public static bool ExistProgram(string prog) { +#if UNITY_EDITOR_WIN return RunCommand(".", "where", new string[] {prog}) == 0; +#elif UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX + return RunCommand(".", "which", new string[] {prog}) == 0; +#endif + return false; }