From b81fb3c865fd9e8c2d8005f57db8df7cab0c28c7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 16 Aug 2022 05:41:46 +0530 Subject: [PATCH] Disable pre-warming when running gen-config.py --- gen-config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gen-config.py b/gen-config.py index 8fdbc2a8a..813684c66 100755 --- a/gen-config.py +++ b/gen-config.py @@ -1,8 +1,10 @@ -#!/usr/bin/env python +#!./kitty/launcher/kitty +launch # License: GPLv3 Copyright: 2021, Kovid Goyal +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 = []