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

pixi global sync shouldn't fail when no executable has been found #2692

Open
2 tasks done
ruben-arts opened this issue Dec 11, 2024 · 1 comment
Open
2 tasks done
Labels
area:global Related to pixi global

Comments

@ruben-arts
Copy link
Contributor

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Install an old version of python

pixi global install python=3.11

Modify the version of python in the manifest to *

pixi global edit vim

Remove the environment to force a reinstall on sync

rm ~/.pixi/envs/python

Sync the manifest with the environments

pixi global sync

✔ Nothing to do. The pixi global installation is already up-to-date.
 WARN Couldn't sync environment python
  × Failed to add executables for environment: python
  ╰─▶ Couldn't find executable 2to3 in /Users/rubenarts/.pixi/envs/python, found these executables: ["idle3", "pydoc", "pydoc3", "python",
      "python3", "python3-config", "python3.1", "pydoc"]

  × Some environments couldn't be synced.

Issue description

This makes sense when the user adds a wrong executable, but because of the packages possibly changing executables between versions. This can fail on reinstallations or clean installations of the manifest.

Expected behavior

I would expect pixi to ask if it is okay to remove it. e.g.

pixi global sync
 WARN Couldn't sync environment python
Couldn't sync the python environment because the `2to3` executable was missing. Executables found where: ["idle3", "pydoc", "pydoc3", "python", "python3", "python3-config", "python3.1", "pydoc"]
You want to remove the executable?
>  Yes, remove executable from manifest
   No, leave the executable in the manifest and exit
@wolfv
Copy link
Member

wolfv commented Dec 11, 2024

Thanks for writing this up!

@Hofer-Julian Hofer-Julian added the area:global Related to pixi global label Dec 11, 2024
@Hofer-Julian Hofer-Julian changed the title Pixi global sync shouldn't fail when now executable was found. pixi global sync shouldn't fail when no executable has been found Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:global Related to pixi global
Projects
None yet
Development

No branches or pull requests

3 participants