mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
fix launch of standalone publisher
This commit is contained in:
parent
b2c7cbde30
commit
6ce80fa3b2
1 changed files with 12 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
import sys
|
||||
import platform
|
||||
import subprocess
|
||||
from openpype.lib import get_pype_execute_args
|
||||
from . import PypeModule, ITrayAction
|
||||
|
|
@ -35,4 +35,14 @@ class StandAlonePublishAction(PypeModule, ITrayAction):
|
|||
|
||||
def run_standalone_publisher(self):
|
||||
args = get_pype_execute_args("standalonepublisher")
|
||||
subprocess.Popen(args, creationflags=subprocess.DETACHED_PROCESS)
|
||||
kwargs = {}
|
||||
if platform.system().lower() == "darwin":
|
||||
new_args = ["open", "-a", args.pop(0), "--args"]
|
||||
new_args.extend(args)
|
||||
args = new_args
|
||||
|
||||
detached_process = getattr(subprocess, "DETACHED_PROCESS", None)
|
||||
if detached_process is not None:
|
||||
kwargs["creationflags"] = detached_process
|
||||
|
||||
subprocess.Popen(args, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue