mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 10:12:17 +02:00
Fix use of single instance with detach
This commit is contained in:
@@ -349,9 +349,14 @@ def handle_single_instance_command(boss: BossType, sys_args: Sequence[str], envi
|
||||
def main(sys_args: list[str]) -> None:
|
||||
global args
|
||||
args, items = parse_panel_args(sys_args[1:])
|
||||
talk_fd = -1
|
||||
if args.single_instance:
|
||||
si_data = os.environ.get('KITTY_SI_DATA', '')
|
||||
if si_data:
|
||||
talk_fd = int(si_data)
|
||||
if args.detach:
|
||||
from kitty.utils import detach
|
||||
detach(log_file=args.detached_log or os.devnull)
|
||||
detach(talk_fd, log_file=args.detached_log or os.devnull)
|
||||
sys.argv = ['kitty']
|
||||
if args.debug_rendering:
|
||||
sys.argv.append('--debug-rendering')
|
||||
|
||||
Reference in New Issue
Block a user