added isdir check

This commit is contained in:
iLLiCiTiT 2021-05-25 11:15:57 +02:00
parent e433f17c29
commit 7ea0e82103

View file

@ -1,3 +1,4 @@
import os
from openpype.lib import PreLaunchHook
@ -15,8 +16,8 @@ class LaunchWithTerminal(PreLaunchHook):
def execute(self):
executable = self.launch_context.executable
# Skip executables not starting with ".app"
if not executable.endswith(".app"):
# Skip executables not ending with ".app" or that are not folder
if not executable.endswith(".app") or not os.path.isdir(executable):
return
# Check if first argument match executable path