Disable pre-warming when running gen-config.py

This commit is contained in:
Kovid Goyal 2022-08-16 05:41:46 +05:30
parent 814dd8a275
commit b81fb3c865
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1,8 +1,10 @@
#!/usr/bin/env python
#!./kitty/launcher/kitty +launch
# License: GPLv3 Copyright: 2021, Kovid Goyal <kovid at kovidgoyal.net>
import os
import re
import sys
from typing import List
from kitty.conf.generate import write_output
@ -22,6 +24,9 @@ def patch_color_list(path: str, colors: List[str], name: str, spc: str = ' ')
def main() -> None:
if 'prewarmed' in getattr(sys, 'kitty_run_data'):
os.environ.pop('KITTY_PREWARM_SOCKET')
os.execlp(sys.executable, sys.executable, '+launch', __file__, *sys.argv[1:])
from kitty.options.definition import definition
write_output('kitty', definition)
nullable_colors = []