homebrew path (#344)
This commit is contained in:
1 parent
e156fea09c
commit
34b3f92d20
3 files changed
+8
-4
No files matched your search
@@ -3,6 +3,8 @@ name: build_osx
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
osx_app:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PROGRAM_NAME = "KaTrain"
|
||||
VERSION = "1.7.5"
|
||||
VERSION = "1.7.6"
|
||||
HOMEPAGE = "https://github.com/sanderland/katrain"
|
||||
CONFIG_MIN_VERSION = "1.7.0" # keep config files from this version
|
||||
ANALYSIS_FORMAT_VERSION = "1.0"
|
||||
|
||||
@@ -79,11 +79,13 @@ class KataGoEngine:
|
||||
if exepath and not os.path.isfile(exe):
|
||||
self.katrain.log(i18n._("Kata exe not found").format(exe=exe), OUTPUT_ERROR)
|
||||
return # don't start
|
||||
elif not exepath and not any(
|
||||
os.path.isfile(os.path.join(path, exe)) for path in os.environ.get("PATH", "").split(os.pathsep)
|
||||
):
|
||||
elif not exepath:
|
||||
paths = os.getenv("PATH", ".").split(os.pathsep) + ["/opt/homebrew/bin/"]
|
||||
exe_with_paths = [os.path.join(path, exe) for path in paths if os.path.isfile(os.path.join(path, exe))]
|
||||
if not exe_with_paths:
|
||||
self.katrain.log(i18n._("Kata exe not found in path").format(exe=exe), OUTPUT_ERROR)
|
||||
return # don't start
|
||||
exe = exe_with_paths[0]
|
||||
elif not os.path.isfile(model):
|
||||
self.katrain.log(i18n._("Kata model not found").format(model=model), OUTPUT_ERROR)
|
||||
return # don't start
|
||||
|
||||
Reference in new issue
Block a user