Dont rely on hard links

This commit is contained in:
Kovid Goyal 2025-03-26 21:59:24 +05:30
parent 305c1a25c5
commit f058c597ae
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -10,7 +10,7 @@
import time
import unittest
from collections.abc import Callable, Generator, Iterator, Sequence
from contextlib import contextmanager, suppress
from contextlib import contextmanager
from functools import lru_cache
from tempfile import TemporaryDirectory
from threading import Thread
@ -184,8 +184,7 @@ def run_go(packages: set[str], names: str) -> GoProc:
for name in names:
cmd.extend(('-run', name))
cmd += go_pkg_args
with suppress(FileExistsError):
os.link('kitty_tests/GraphemeBreakTest.json', 'tools/wcswidth/GraphemeBreakTest.json')
shutil.copy2('kitty_tests/GraphemeBreakTest.json', 'tools/wcswidth/GraphemeBreakTest.json')
return GoProc(cmd)