mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +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
|
from openpype.lib import PreLaunchHook
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -15,8 +16,8 @@ class LaunchWithTerminal(PreLaunchHook):
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
executable = self.launch_context.executable
|
executable = self.launch_context.executable
|
||||||
# Skip executables not starting with ".app"
|
# Skip executables not ending with ".app" or that are not folder
|
||||||
if not executable.endswith(".app"):
|
if not executable.endswith(".app") or not os.path.isdir(executable):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Check if first argument match executable path
|
# Check if first argument match executable path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue