Merge pull request #5 from Roland0511/fix/exist-program-check
[fix] 修复ExistProgram在非Windows平台无法返回正确结果的问题main
commit
47da01204b
|
@ -52,7 +52,12 @@ namespace HybridCLR.Editor.Installer
|
||||||
|
|
||||||
public static bool ExistProgram(string prog)
|
public static bool ExistProgram(string prog)
|
||||||
{
|
{
|
||||||
|
#if UNITY_EDITOR_WIN
|
||||||
return RunCommand(".", "where", new string[] {prog}) == 0;
|
return RunCommand(".", "where", new string[] {prog}) == 0;
|
||||||
|
#elif UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX
|
||||||
|
return RunCommand(".", "which", new string[] {prog}) == 0;
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue