From d571487fcd6efb9c8c98bc33e6a14de105968582 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 26 May 2021 10:54:21 +0200 Subject: [PATCH] reversed condition logic --- openpype/hooks/pre_mac_launch.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openpype/hooks/pre_mac_launch.py b/openpype/hooks/pre_mac_launch.py index db4c7858c7..e0c3133556 100644 --- a/openpype/hooks/pre_mac_launch.py +++ b/openpype/hooks/pre_mac_launch.py @@ -23,6 +23,9 @@ class LaunchWithTerminal(PreLaunchHook): # Check if first argument match executable path # - Few applications are not executed directly but through OpenPype # process (Photoshop, AfterEffects, Harmony, ...). These should not - # use `open -an`. - if self.launch_context.launch_args[0] == executable: - self.launch_context.launch_args.insert(0, ["open", "-an"]) + # use `open`. + if self.launch_context.launch_args[0] != executable: + return + + # Prepend open arguments + self.launch_context.launch_args.insert(0, ["open", "-a"])