mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
added isdir check
This commit is contained in:
parent
e433f17c29
commit
7ea0e82103
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue