From f058c597ae7bd35336e02a9f302bc440e9333e3e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 26 Mar 2025 21:59:24 +0530 Subject: [PATCH] Dont rely on hard links --- kitty_tests/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kitty_tests/main.py b/kitty_tests/main.py index afdeca092..2f10b2eb4 100644 --- a/kitty_tests/main.py +++ b/kitty_tests/main.py @@ -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)