Merge pull request #5 from Roland0511/fix/exist-program-check

[fix] 修复ExistProgram在非Windows平台无法返回正确结果的问题
main
walon 2022-10-08 21:32:31 +08:00 committed by GitHub
commit 47da01204b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}