Get test.py working when prewarm socket is in operation
This commit is contained in:
parent
7ce2b4c641
commit
62c0272df2
4
test.py
4
test.py
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from tempfile import TemporaryDirectory
|
from tempfile import TemporaryDirectory
|
||||||
@ -24,6 +25,9 @@ def env_vars(**kw: str) -> Iterator[None]:
|
|||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
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:])
|
||||||
warnings.simplefilter('error')
|
warnings.simplefilter('error')
|
||||||
current_home = os.path.expanduser('~') + os.sep
|
current_home = os.path.expanduser('~') + os.sep
|
||||||
paths = os.environ.get('PATH', '/usr/local/sbin:/usr/local/bin:/usr/bin').split(os.pathsep)
|
paths = os.environ.get('PATH', '/usr/local/sbin:/usr/local/bin:/usr/bin').split(os.pathsep)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user