Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: The UV executor exectures the wrong file #283

Merged
merged 1 commit into from
Mar 15, 2025

Conversation

sewi-cpan
Copy link
Contributor

@sewi-cpan sewi-cpan commented Mar 14, 2025

uv is installed via Snap on Ubuntu. Snap is a wrapper providing a safe environment for execution.

Snap symlinks all executable commands to it's binary.

  • Called as snap: Snap CLI
  • Called as a symlink from any other file: Execute the file in it's environment

The UvExecutor class resolved the path itself including any symlinks and eventually calls /usr/bin/snap instead of /snap/bin/uv. Snaps assumes a call to it's own CLI and fails.

With this patch, the shell will resolve the path and provide the correct "executed file" information ($0 in a Bash script) to Snap.

fixes #282

Description of changes

Replace this text with a description of the changes proposed in this PR, including the motivation for these changes and a reference to any related GitHub issue or discussion.

Pre-merge Checklist

  • New features (if any) are covered by new feature tests
  • New features (if any) are documented
  • Bug fixes (if any) are accompanied by a test (if not too complicated to do so)
  • poe check executed successfully
  • This PR targets the development branch for code changes or main if only documentation is updated

Sorry, something went wrong.

`uv` is installed via Snap on Ubuntu. Snap is a wrapper providing a safe environment for execution.

Snap symlinks all executable commands to it's binary.

* Called as `snap`: Snap CLI
* Called as a symlink from any other file: Execute the file in it's environment

The `UvExecutor` class resolved the path itself including any symlinks and eventually calls `/usr/bin/snap` instead of `/snap/bin/uv`. Snaps assumes a call to it's own CLI and fails.

With this patch, the shell will resolve the path and provide the correct "executed file" information (`$0` in a Bash script) to Snap.

fixes nat-n#282
@nat-n nat-n merged commit b9ad0d2 into nat-n:main Mar 15, 2025
20 checks passed
nat-n added a commit that referenced this pull request Mar 15, 2025
github-actions bot pushed a commit that referenced this pull request Mar 15, 2025
`uv` is installed via Snap on Ubuntu. Snap is a wrapper providing a safe environment for execution.

Snap symlinks all executable commands to it's binary.

* Called as `snap`: Snap CLI
* Called as a symlink from any other file: Execute the file in it's environment

The `UvExecutor` class resolved the path itself including any symlinks and eventually calls `/usr/bin/snap` instead of `/snap/bin/uv`. Snaps assumes a call to it's own CLI and fails.

With this patch, the shell will resolve the path and provide the correct "executed file" information (`$0` in a Bash script) to Snap.

fixes #282 b9ad0d2
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.

UvExecutor detection of the uv binary fails
2 participants