Skip to content

Fix cross-device error when installing uv on Linux#158

Merged
rchl merged 2 commits intosublimelsp:mainfrom
OskarAsplin:fix/cross-device-uv-install
Feb 20, 2026
Merged

Fix cross-device error when installing uv on Linux#158
rchl merged 2 commits intosublimelsp:mainfrom
OskarAsplin:fix/cross-device-uv-install

Conversation

@OskarAsplin
Copy link
Copy Markdown
Contributor

@OskarAsplin OskarAsplin commented Feb 20, 2026

Problem

On Linux systems where /tmp is mounted as tmpfs, installing the self-managed uv binary fails with:

OSError: [Errno 18] Invalid cross-device link: '/tmp/tmp.../uv' -> '~/.cache/.../lsp_utils/uv/uv'

This happens because Path.replace() calls os.rename() internally, which cannot move files across filesystem boundaries.

Fix

Pass dir=target_directory to TemporaryDirectory so temp files are created on the same filesystem as the destination, allowing os.rename() to succeed without any cross-device issue.

@rchl rchl merged commit a5553f2 into sublimelsp:main Feb 20, 2026
4 checks passed
@OskarAsplin OskarAsplin deleted the fix/cross-device-uv-install branch February 20, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants